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 <anton@khirnov.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
/* 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);