From: Christian Brauner Date: Mon, 30 Oct 2017 13:17:20 +0000 (+0100) Subject: cgfsng: fix cgroup2 detection X-Git-Tag: lxc-3.0.0.beta1~205^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdfe90a49f516b0f1210d181980f14a4765e10da;p=thirdparty%2Flxc.git cgfsng: fix cgroup2 detection Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 897336f07..e43edd7d4 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -815,7 +815,7 @@ static void add_controller(char **clist, char *mountpoint, char *base_cgroup) new->fullcgpath = NULL; /* record if this is the cgroup v2 hierarchy */ - if (!strcmp(base_cgroup, "cgroup2")) + if (clist && !strcmp(*clist, "cgroup2")) new->is_cgroup_v2 = true; else new->is_cgroup_v2 = false;