From: Ivana Hutarova Varekova Date: Wed, 9 Oct 2013 09:43:38 +0000 (+0200) Subject: cgroup_config_create_template_group: test the right variable X-Git-Tag: v0.41~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14c2cae7f387eb4d1ffd5f4c8f45e73a33e4ce9b;p=thirdparty%2Flibcgroup.git cgroup_config_create_template_group: test the right variable cgroup_config_create_template_group tests the return value of bogus variable. This patch fix it. Signed-off-by: Ivana Hutarova Varekova Acked-by: Peter Schiffer Acked-by: Dhaval Giani --- diff --git a/src/config.c b/src/config.c index eacb4909..cdbd5085 100644 --- a/src/config.c +++ b/src/config.c @@ -1640,7 +1640,7 @@ int cgroup_config_create_template_group(struct cgroup *cgroup, /* no template is present for given name x controller pair * add controller to result cgroup */ aux_cgroup = cgroup_new_cgroup(cgroup->name); - if (ret) { + if (aux_cgroup) { ret = ECGINVAL; fprintf(stderr, "cgroup %s can't be created\n", cgroup->name);