]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: fix inverse null check 892/head
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 11 Mar 2016 04:40:47 +0000 (20:40 -0800)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 11 Mar 2016 04:50:59 +0000 (20:50 -0800)
remove the hierarchy if the fullcgpath is NOT null.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/cgfsng.c

index ea90903fe23a515accdb7cef5e90979827a10710..a6767c5201487a4a4759f6f8bb8cead49afe29b0 100644 (file)
@@ -1009,7 +1009,7 @@ static void cgfsng_destroy(void *hdata, struct lxc_conf *conf)
                int i;
                for (i = 0; d->hierarchies[i]; i++) {
                        struct hierarchy *h = d->hierarchies[i];
-                       if (!h->fullcgpath) {
+                       if (h->fullcgpath) {
                                recursive_destroy(h->fullcgpath, conf);
                                free(h->fullcgpath);
                                h->fullcgpath = NULL;