The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2325
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Every exit point in function suggest_default_idmap() @ conf.c makes sure to free the dynamically allocated strings uname and gname. The flagged exit point does not free neither of them. The two Coverity reports mention "uname" and "gname" respectively.
From c2ca535d0600c30a82d53ff06fafda8cc617ad80 Mon Sep 17 00:00:00 2001 From: Simos Xenitellis <[email protected]> Date: Tue, 15 May 2018 00:28:16 +0000 Subject: [PATCH] Fixed resource leak in suggest_default_idmap() coverity: #1425802 coverity: #1425844 Signed-off-by: Simos Xenitellis <[email protected]> --- src/lxc/conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index e854b8b03..22edd8cb7 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4497,6 +4497,8 @@ 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(gname); + free(uname); return; }
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
