The aux_cgroup pointer will be NULL when an error occurs, but the check
is for it being non-NULL.

Signed-off-by: Anton Khirnov <an...@khirnov.net>
Acked-by: Dhaval Giani <dhaval.gi...@gmail.com>
---
 src/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index a576001..090bea5 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1826,7 +1826,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 (aux_cgroup) {
+               if (!aux_cgroup) {
                        ret = ECGINVAL;
                        fprintf(stderr, "cgroup %s can't be created\n",
                                cgroup->name);
-- 
2.0.0


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to