[lxc-devel] [lxc/master] coverity: #1425844

simos on Github lxc-bot at linuxcontainers.org
Tue May 15 11:45:10 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 378 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180515/d4b0074f/attachment.bin>
-------------- next part --------------
From fbd4a4d1686cefdf2ee2a5e5d77f64bb6c283a82 Mon Sep 17 00:00:00 2001
From: Simos Xenitellis <simos.lists at googlemail.com>
Date: Tue, 15 May 2018 11:37:14 +0000
Subject: [PATCH] coverity: #1425844

Resource leak

Signed-off-by: Simos Xenitellis <simos.lists at googlemail.com>
---
 src/lxc/conf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index e854b8b03..5c66c6f35 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -4497,6 +4497,7 @@ void suggest_default_idmap(void)
 	if (!urange || !grange) {
 		ERROR("You do not have subuids or subgids allocated");
 		ERROR("Unprivileged containers require subuids and subgids");
+		free(uname);
 		return;
 	}
 


More information about the lxc-devel mailing list