From bac806d1a11ad3e15f69b13579153d1144e4b2e4 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Tue, 28 Jan 2014 13:28:19 +0000 Subject: [PATCH] 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 --- src/lxc/lxccontainer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.47.2