Skip to content

Commit

Permalink
Merge pull request #2323 from simos/fix-resource-leak-cid1425836
Browse files Browse the repository at this point in the history
Fixed resource leak in userns_exec_full()
  • Loading branch information
brauner committed May 16, 2018
2 parents 23cf184 + 4dc41f9 commit 6ef5e0c
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 6ef5e0c

Please sign in to comment.