iSulad/0010-ensure-list-name-is-not-null.patch
zhangxiaoyu 0fe88d116c upgrade from upstream
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
(cherry picked from commit d5491fea9ae065ee392984598d2f8cfeafb44a62)
2023-02-22 15:59:30 +08:00

27 lines
1.0 KiB
Diff

From 4d5fff88868354403fffa8ae0f6aa8e051842a70 Mon Sep 17 00:00:00 2001
From: haozi007 <liuhao27@huawei.com>
Date: Wed, 15 Feb 2023 11:27:04 +0800
Subject: [PATCH 10/19] ensure list name is not null
Signed-off-by: haozi007 <liuhao27@huawei.com>
---
src/daemon/entry/cri/cni_network_plugin.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/daemon/entry/cri/cni_network_plugin.cc b/src/daemon/entry/cri/cni_network_plugin.cc
index 976a21a4..9b03bea1 100644
--- a/src/daemon/entry/cri/cni_network_plugin.cc
+++ b/src/daemon/entry/cri/cni_network_plugin.cc
@@ -296,7 +296,7 @@ void CniNetworkPlugin::GetDefaultCNINetwork(const std::string &confDir, std::vec
continue;
}
- if (n_list == nullptr || n_list->plugin_len == 0) {
+ if (n_list == nullptr || n_list->name == nullptr || n_list->plugin_len == 0) {
WARN("CNI config list %s has no networks, skipping", elem.c_str());
free_cni_network_list_conf(n_list);
n_list = nullptr;
--
2.25.1