From: Serge Hallyn Date: Mon, 23 Jun 2014 13:41:49 +0000 (-0500) Subject: coverity: avoid possible null deref X-Git-Tag: lxc-1.1.0.alpha1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=513e1502c824e7705a1f9af73be0b58ec6fd0153;p=thirdparty%2Flxc.git coverity: avoid possible null deref Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 3d1cf3458..b8eacc1d7 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -2147,7 +2147,8 @@ static bool set_config_item_locked(struct lxc_container *c, const char *key, con c->lxc_conf = lxc_conf_init(); if (!c->lxc_unexp_conf) { 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) return false;