From 65ed92c4c5bdcc7dadd3e580a9a9e287512d3660 Mon Sep 17 00:00:00 2001 From: WangFengTu Date: Mon, 27 Dec 2021 11:15:13 +0800 Subject: [PATCH] sync patches from upstream Signed-off-by: WangFengTu --- ...-fix-memory-leak-in-CniNetworkPlugin.patch | 29 +++++++++++++++++++ 0023-fix-codex-error.patch | 26 +++++++++++++++++ iSulad.spec | 10 ++++++- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0022-fix-memory-leak-in-CniNetworkPlugin.patch create mode 100644 0023-fix-codex-error.patch diff --git a/0022-fix-memory-leak-in-CniNetworkPlugin.patch b/0022-fix-memory-leak-in-CniNetworkPlugin.patch new file mode 100644 index 0000000..30d9f73 --- /dev/null +++ b/0022-fix-memory-leak-in-CniNetworkPlugin.patch @@ -0,0 +1,29 @@ +From f321f120a7b5d987fb12fbca6942b9866a9c7400 Mon Sep 17 00:00:00 2001 +From: zhangxiaoyu +Date: Tue, 21 Dec 2021 16:13:49 +0800 +Subject: [PATCH 22/23] fix memory leak in CniNetworkPlugin + +Signed-off-by: zhangxiaoyu +--- + src/daemon/entry/cri/cni_network_plugin.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/daemon/entry/cri/cni_network_plugin.cc b/src/daemon/entry/cri/cni_network_plugin.cc +index ffdbeb10..b86b21e8 100644 +--- a/src/daemon/entry/cri/cni_network_plugin.cc ++++ b/src/daemon/entry/cri/cni_network_plugin.cc +@@ -165,9 +165,10 @@ void CniNetworkPlugin::PlatformInit(Errors &error) + { + char *tpath { nullptr }; + char *serr { nullptr }; +- tpath = look_path(const_cast("nsenter"), &serr); ++ tpath = look_path(std::string("nsenter").c_str(), &serr); + if (tpath == nullptr) { + error.SetError(serr); ++ free(serr); + return; + } + m_nsenterPath = tpath; +-- +2.25.1 + diff --git a/0023-fix-codex-error.patch b/0023-fix-codex-error.patch new file mode 100644 index 0000000..7fb670c --- /dev/null +++ b/0023-fix-codex-error.patch @@ -0,0 +1,26 @@ +From 8cd3a33c5e0ded33f2e8d3d2bb41f93c298bc2c5 Mon Sep 17 00:00:00 2001 +From: WangFengTu +Date: Mon, 27 Dec 2021 10:07:51 +0800 +Subject: [PATCH 23/23] fix codex error + +Signed-off-by: WangFengTu +--- + src/daemon/modules/image/oci/oci_import.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/modules/image/oci/oci_import.c b/src/daemon/modules/image/oci/oci_import.c +index ebb555fd..ae2f547a 100644 +--- a/src/daemon/modules/image/oci/oci_import.c ++++ b/src/daemon/modules/image/oci/oci_import.c +@@ -256,7 +256,7 @@ static int create_manifest(import_desc *desc) + } + manifest->layers_len = 1; + +- manifest->layers[0] = util_common_calloc_s(sizeof(registry_manifest_schema2_layers_element *)); ++ manifest->layers[0] = util_common_calloc_s(sizeof(registry_manifest_schema2_layers_element)); + if (manifest->layers[0] == NULL) { + ERROR("out of memory"); + isulad_try_set_error_message("out of memory"); +-- +2.25.1 + diff --git a/iSulad.spec b/iSulad.spec index a6cfee5..3926a2b 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,5 +1,5 @@ %global _version 2.0.10 -%global _release 11 +%global _release 12 %global is_systemd 1 %global enable_shimv2 1 %global is_embedded 1 @@ -34,6 +34,8 @@ Patch0018: 0018-Fixed-dangerous-memory-operations.patch Patch0019: 0019-add-pull-request-gateway-checker-for-build-and-ut.patch Patch0020: 0020-Optimize-websocket-streaming-service-code.patch Patch0021: 0021-Fixed-a-bug-that-occurs-when-starting-container-in-h.patch +Patch0022: 0022-fix-memory-leak-in-CniNetworkPlugin.patch +Patch0023: 0023-fix-codex-error.patch %ifarch x86_64 aarch64 Provides: libhttpclient.so()(64bit) @@ -258,6 +260,12 @@ fi %endif %changelog +* Mon Dec 27 2021 wangfengtu - 2.0.10-12 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: sync patches from upstream + * Thu Dec 09 2021 chengzeruizhi - 2.0.10-11 - Type: bugfix - ID: NA