Skip to content

Commit

Permalink
coverity: #1425836
Browse files Browse the repository at this point in the history
Resource leak

Signed-off-by: Simos Xenitellis <simos.lists@googlemail.com>
  • Loading branch information
Simos Xenitellis authored and Christian Brauner committed May 16, 2018
1 parent 4b18ebc commit 4ecff63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lxc/conf.c
Expand Up @@ -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)
Expand Down

0 comments on commit 4ecff63

Please sign in to comment.