Commit 513e1502 by Serge Hallyn

coverity: avoid possible null deref

parent 0cad52a1
...@@ -2147,7 +2147,8 @@ static bool set_config_item_locked(struct lxc_container *c, const char *key, con ...@@ -2147,7 +2147,8 @@ static bool set_config_item_locked(struct lxc_container *c, const char *key, con
c->lxc_conf = lxc_conf_init(); c->lxc_conf = lxc_conf_init();
if (!c->lxc_unexp_conf) { if (!c->lxc_unexp_conf) {
c->lxc_unexp_conf = lxc_conf_init(); c->lxc_unexp_conf = lxc_conf_init();
c->lxc_unexp_conf->unexpanded = true; if (c->lxc_unexp_conf)
c->lxc_unexp_conf->unexpanded = true;
} }
if (!c->lxc_conf || !c->lxc_unexp_conf) if (!c->lxc_conf || !c->lxc_unexp_conf)
return false; return false;
......
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