[lxc-devel] [lxc/master] coverity: #1425836
2xsec on Github
lxc-bot at linuxcontainers.org
Fri Jun 8 07:40:38 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 371 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180608/c7a40476/attachment.bin>
-------------- next part --------------
From 80758b4b2a19b7561d4258172f7a7c12256cfc82 Mon Sep 17 00:00:00 2001
From: Donghwa Jeong <dh48.jeong at samsung.com>
Date: Fri, 8 Jun 2018 16:38:56 +0900
Subject: [PATCH] coverity: #1425836
Resource leak
Signed-off-by: Donghwa Jeong <dh48.jeong at samsung.com>
---
src/lxc/conf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 87674541f..b2872c995 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -4470,8 +4470,11 @@ int userns_exec_full(struct lxc_conf *conf, int (*fn)(void *), void *data,
if (pid > 0)
ret = wait_for_pid(pid);
- if (idmap)
+ if (idmap) {
lxc_free_idmap(idmap);
+ free(idmap);
+ }
+
if (host_uid_map && (host_uid_map != container_root_uid))
free(host_uid_map);
if (host_gid_map && (host_gid_map != container_root_gid))
More information about the lxc-devel
mailing list