1 Star 0 Fork 43

gaohuatao/src-iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0002-fix-memleak-when-use-multiple-volumes-from.patch 943 Bytes
一键复制 编辑 原始数据 按行查看 历史
wangfengtu 提交于 2021-12-02 17:07 . sync patches from upstream
From 2e6f54021ee4b2b81fb0119714f1c4fffb4a031f Mon Sep 17 00:00:00 2001
From: WangFengTu <[email protected]>
Date: Fri, 19 Nov 2021 15:11:23 +0800
Subject: [PATCH 02/14] fix memleak when use multiple --volumes-from
Signed-off-by: WangFengTu <[email protected]>
---
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gaohuatao/src-iSulad.git
[email protected]:gaohuatao/src-iSulad.git
gaohuatao
src-iSulad
src-iSulad
master

搜索帮助