2021-11-19 16:57:47 +08:00
|
|
|
From 2e6f54021ee4b2b81fb0119714f1c4fffb4a031f Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: WangFengTu <wangfengtu@huawei.com>
|
|
|
|
|
Date: Fri, 19 Nov 2021 15:11:23 +0800
|
2021-12-02 17:07:49 +08:00
|
|
|
Subject: [PATCH 02/14] fix memleak when use multiple --volumes-from
|
2021-11-19 16:57:47 +08:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|