Commit 908fde6a by Serge Hallyn

coverity: avoid deref of explicitly NULL variable on error path

parent 32571606
...@@ -4008,6 +4008,7 @@ static struct lxc_list *idmap_add_id(struct lxc_conf *conf, uid_t uid) ...@@ -4008,6 +4008,7 @@ static struct lxc_list *idmap_add_id(struct lxc_conf *conf, uid_t uid)
err: err:
ERROR("Out of memory building a new uid map"); ERROR("Out of memory building a new uid map");
if (new)
lxc_free_idmap(new); lxc_free_idmap(new);
free(new); free(new);
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment