Commit 908fde6a by Serge Hallyn

coverity: avoid deref of explicitly NULL variable on error path

parent 32571606
......@@ -4008,7 +4008,8 @@ static struct lxc_list *idmap_add_id(struct lxc_conf *conf, uid_t uid)
err:
ERROR("Out of memory building a new uid map");
lxc_free_idmap(new);
if (new)
lxc_free_idmap(new);
free(new);
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