]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1425836
authorDonghwa Jeong <dh48.jeong@samsung.com>
Fri, 8 Jun 2018 07:38:56 +0000 (16:38 +0900)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 10 Dec 2018 08:05:29 +0000 (09:05 +0100)
Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
src/lxc/conf.c

index 7714eccf528d7e08f35bed92731d5e5fc0b507df..15bf634e145610f891b9431ee5ef8dc7634609f2 100644 (file)
@@ -4188,8 +4188,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))