From: S.Çağlar Onur Date: Sat, 2 Nov 2013 21:15:36 +0000 (-0400) Subject: make sure to check c->lxc_conf is not NULL before dereferencing it. X-Git-Tag: lxc-1.0.0.alpha3~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=497a2995687a56a1f12a69311d8bacbb645e0d97;p=thirdparty%2Flxc.git make sure to check c->lxc_conf is not NULL before dereferencing it. Signed-off-by: S.Çağlar Onur Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 946133d87..ef828dca2 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -453,7 +453,7 @@ static bool lxcapi_load_config(struct lxc_container *c, const char *alt_file) static void lxcapi_want_daemonize(struct lxc_container *c) { - if (!c) + if (!c || !c->lxc_conf) return; if (container_mem_lock(c)) { ERROR("Error getting mem lock");