The aux_cgroup pointer will be NULL when an error occurs, but the check
is for it being non-NULL.
---
 src/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index a576001..6d6a2da 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 == NULL) {
                        ret = ECGINVAL;
                        fprintf(stderr, "cgroup %s can't be created\n",
                                cgroup->name);
-- 
2.0.0


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to