fix memleak when use multiple --volumes-from
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
This commit is contained in:
parent
b24c8e324c
commit
ea99f0bd03
29
0001-fix-memleak-when-use-multiple-volumes-from.patch
Normal file
29
0001-fix-memleak-when-use-multiple-volumes-from.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 2e6f54021ee4b2b81fb0119714f1c4fffb4a031f Mon Sep 17 00:00:00 2001
|
||||
From: WangFengTu <wangfengtu@huawei.com>
|
||||
Date: Fri, 19 Nov 2021 15:11:23 +0800
|
||||
Subject: [PATCH] fix memleak when use multiple --volumes-from
|
||||
|
||||
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
|
||||
---
|
||||
src/daemon/modules/spec/specs_mount.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/daemon/modules/spec/specs_mount.c b/src/daemon/modules/spec/specs_mount.c
|
||||
index 175a0fbe..6b6ac87d 100644
|
||||
--- a/src/daemon/modules/spec/specs_mount.c
|
||||
+++ b/src/daemon/modules/spec/specs_mount.c
|
||||
@@ -2773,6 +2773,11 @@ static int calc_volumes_from_len(host_config *host_spec, size_t *len)
|
||||
if (cont->common_config != NULL && cont->common_config->mount_points != NULL) {
|
||||
*len += cont->common_config->mount_points->len;
|
||||
}
|
||||
+
|
||||
+ free(id);
|
||||
+ id = NULL;
|
||||
+ container_unref(cont);
|
||||
+ cont = NULL;
|
||||
}
|
||||
|
||||
out:
|
||||
--
|
||||
2.25.1
|
||||
|
||||
10
iSulad.spec
10
iSulad.spec
@ -1,5 +1,5 @@
|
||||
%global _version 2.0.10
|
||||
%global _release 3
|
||||
%global _release 4
|
||||
%global is_systemd 1
|
||||
%global enable_shimv2 1
|
||||
|
||||
@ -12,6 +12,8 @@ URL: https://gitee.com/openeuler/iSulad
|
||||
Source: https://gitee.com/openeuler/iSulad/repository/archive/v%{version}.tar.gz
|
||||
BuildRoot: {_tmppath}/iSulad-%{version}
|
||||
|
||||
Patch0001: 0001-fix-memleak-when-use-multiple-volumes-from.patch
|
||||
|
||||
%ifarch x86_64 aarch64
|
||||
Provides: libhttpclient.so()(64bit)
|
||||
Provides: libisula.so()(64bit)
|
||||
@ -224,6 +226,12 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Nov 19 2021 wangfengtu <wangfengtu@huawei.com> - 2.0.10-4
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: fix memleak when use multiple --volumes-from
|
||||
|
||||
* Tue Nov 16 2021 wujing <wujing50@huawei.com> - 2.0.10-3
|
||||
- Type: enhancement
|
||||
- ID: NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user