!230 sync patches from upstream

Merge pull request !230 from wangfengtu/fix_codex_error
This commit is contained in:
openeuler-ci-bot 2021-12-27 03:41:35 +00:00 committed by Gitee
commit a671898afb
3 changed files with 64 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From f321f120a7b5d987fb12fbca6942b9866a9c7400 Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
Date: Tue, 21 Dec 2021 16:13:49 +0800
Subject: [PATCH 22/23] fix memory leak in CniNetworkPlugin
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
---
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<char *>("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

View File

@ -0,0 +1,26 @@
From 8cd3a33c5e0ded33f2e8d3d2bb41f93c298bc2c5 Mon Sep 17 00:00:00 2001
From: WangFengTu <wangfengtu@huawei.com>
Date: Mon, 27 Dec 2021 10:07:51 +0800
Subject: [PATCH 23/23] fix codex error
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
---
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

View File

@ -1,5 +1,5 @@
%global _version 2.0.10 %global _version 2.0.10
%global _release 11 %global _release 12
%global is_systemd 1 %global is_systemd 1
%global enable_shimv2 1 %global enable_shimv2 1
%global is_embedded 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 Patch0019: 0019-add-pull-request-gateway-checker-for-build-and-ut.patch
Patch0020: 0020-Optimize-websocket-streaming-service-code.patch Patch0020: 0020-Optimize-websocket-streaming-service-code.patch
Patch0021: 0021-Fixed-a-bug-that-occurs-when-starting-container-in-h.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 %ifarch x86_64 aarch64
Provides: libhttpclient.so()(64bit) Provides: libhttpclient.so()(64bit)
@ -258,6 +260,12 @@ fi
%endif %endif
%changelog %changelog
* Mon Dec 27 2021 wangfengtu <wangfengtu@huawei.com> - 2.0.10-12
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: sync patches from upstream
* Thu Dec 09 2021 chengzeruizhi <chengzeruizhi@huawei.com> - 2.0.10-11 * Thu Dec 09 2021 chengzeruizhi <chengzeruizhi@huawei.com> - 2.0.10-11
- Type: bugfix - Type: bugfix
- ID: NA - ID: NA