]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: fix cgroup2 detection
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 30 Oct 2017 13:17:20 +0000 (14:17 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 30 Oct 2017 13:32:30 +0000 (14:32 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 897336f07fdff28d2f6ec5d50125f0cdc80a10cc..e43edd7d424d9db27fe539f675c9657439875273 100644 (file)
@@ -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;