From: Serge Hallyn Date: Fri, 11 Mar 2016 04:40:47 +0000 (-0800) Subject: cgfsng: fix inverse null check X-Git-Tag: lxc-2.0.0.rc10~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F892%2Fhead;p=thirdparty%2Flxc.git cgfsng: fix inverse null check remove the hierarchy if the fullcgpath is NOT null. Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/cgfsng.c b/src/lxc/cgfsng.c index ea90903fe..a6767c520 100644 --- a/src/lxc/cgfsng.c +++ b/src/lxc/cgfsng.c @@ -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;