in today's code lxc-start to not stop if setup_cgroup is detecting an error

Signed-off-by: Michel Normand <michel_mno@laposte.net>
---
 src/lxc/conf.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 69cf8e6..f31687f 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -598,6 +598,7 @@ static int setup_cgroup(const char *name, struct lxc_list *cgroups)
 {
 	struct lxc_list *iterator;
 	struct lxc_cgroup *cg;
+	int ret = -1;
 
 	if (lxc_list_empty(cgroups))
 		return 0;
@@ -607,14 +608,15 @@ static int setup_cgroup(const char *name, struct lxc_list *cgroups)
 		cg = iterator->elem;
 
 		if (lxc_cgroup_set(name, cg->subsystem, cg->value))
-			break;
+			goto out;
 
 		DEBUG("cgroup '%s' set to '%s'", cg->subsystem, cg->value);
 	}
 
+	ret = 0;
 	INFO("cgroup has been setup");
-
-	return 0;
+out:
+	return ret;
 }
 
 static void parse_mntopt(char *opt, unsigned long *flags, char **data)
-- 
1.6.3.3

-- 


