]> 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>
Thu, 9 Nov 2017 00:15:48 +0000 (01:15 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index a3f0ce3816a79c9250dbed182a429220910351ad..e1a3a064da7dc627ce1b9070597bf0d9c547d172 100644 (file)
@@ -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;