summaryrefslogtreecommitdiff
path: root/0051-Fix-memory-leak-in-set_connected_container_shm_path.patch
blob: c31e092e04e8b723f713104c0802e4837cf4b09c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 1052a7b67a35b3504045729e1408d4ace8bf50ca Mon Sep 17 00:00:00 2001
From: xuxuepeng <xuxuepeng1@huawei.com>
Date: Tue, 9 Apr 2024 06:35:03 +0800
Subject: [PATCH 51/69] Fix memory leak in set_connected_container_shm_path

Signed-off-by: xuxuepeng <xuxuepeng1@huawei.com>
---
 src/daemon/modules/spec/specs_mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/daemon/modules/spec/specs_mount.c b/src/daemon/modules/spec/specs_mount.c
index 6903ae40..50ee9a85 100644
--- a/src/daemon/modules/spec/specs_mount.c
+++ b/src/daemon/modules/spec/specs_mount.c
@@ -2822,7 +2822,7 @@ static inline int set_sharable_ipc_mode(host_config *host_spec, container_config
 static inline int set_connected_container_shm_path(host_config *host_spec, container_config_v2_common_config *v2_spec)
 {
     container_t *cont = NULL;
-    char *tmp_cid = NULL;
+    __isula_auto_free char *tmp_cid = NULL;
     char *right_path = NULL;
 
 #ifdef ENABLE_CRI_API_V1
-- 
2.34.1