From: Donghwa Jeong Date: Fri, 8 Jun 2018 07:38:56 +0000 (+0900) Subject: coverity: #1425836 X-Git-Tag: lxc-3.1.0~264^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2385%2Fhead;p=thirdparty%2Flxc.git coverity: #1425836 Resource leak Signed-off-by: Donghwa Jeong --- 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 @@ on_error: 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))