]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1425836 2323/head
authorSimos Xenitellis <simos.lists@googlemail.com>
Tue, 15 May 2018 00:19:12 +0000 (00:19 +0000)
committerSimos Xenitellis <simos.lists@googlemail.com>
Tue, 15 May 2018 11:05:36 +0000 (11:05 +0000)
Resource leak

Signed-off-by: Simos Xenitellis <simos.lists@googlemail.com>
src/lxc/conf.c

index e854b8b0335ca056f8a6a716f3b5432502430d51..48f4fef38b89ee2b890843fe727acc3b31eeab21 100644 (file)
@@ -4082,8 +4082,10 @@ struct lxc_list *get_minimal_idmap(struct lxc_conf *conf)
        return idmap;
 
 on_error:
-       if (idmap)
+       if (idmap) {
                lxc_free_idmap(idmap);
+               free(idmap);
+       }
        if (container_root_uid)
                free(container_root_uid);
        if (container_root_gid)