From: Christian Brauner Date: Mon, 30 Oct 2017 13:17:20 +0000 (+0100) Subject: cgfsng: fix cgroup2 detection X-Git-Tag: lxc-2.0.10~607 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89d56cc6831687d366b3e0e67702bc1afd8dc6aa;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 a3f0ce381..e1a3a064d 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -803,7 +803,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;