From: Serge Hallyn Date: Tue, 28 Jan 2014 13:28:19 +0000 (+0000) Subject: lxc_container_new: fail on config file parse error X-Git-Tag: lxc-1.0.0.beta4~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bac806d1a11ad3e15f69b13579153d1144e4b2e4;p=thirdparty%2Flxc.git lxc_container_new: fail on config file parse error If we have a bad config file entry, fail. Otherwise lxc-start will proceed with a partial configuration. Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index aad692f3f..38628908c 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3232,8 +3232,8 @@ struct lxc_container *lxc_container_new(const char *name, const char *configpath goto err; } - if (file_exists(c->configfile)) - lxcapi_load_config(c, NULL); + if (file_exists(c->configfile) && !lxcapi_load_config(c, NULL)) + goto err; if (ongoing_create(c) == 2) { ERROR("Error: %s creation was not completed", c->name);