[lxc-devel] [PATCH] make sure to check c->lxc_conf is not NULL before dereferencing it.

S.Çağlar Onur caglar at 10ur.org
Sat Nov 2 21:15:36 UTC 2013


Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
---
 src/lxc/lxccontainer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index a9d97ad..362b429 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -441,7 +441,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");
-- 
1.8.3.2





More information about the lxc-devel mailing list