]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups/cgfsng: fix get_controllers() for cgroup2
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 31 Oct 2017 16:06:58 +0000 (17:06 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 6 Nov 2017 23:54:28 +0000 (00:54 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 4818fc15f85ec2a1b5949d3d5a2f139b57e162ec..cd0b5c72048fb4f6ef1b399321b803032f8fb146 100644 (file)
@@ -786,7 +786,7 @@ static char **get_controllers(char **klist, char **nlist, char *line)
        /* cgroup v2 does not have separate mountpoints for controllers */
        if (is_cgroup_v2) {
                must_append_controller(klist, nlist, &aret, "cgroup2");
-               return NULL;
+               return aret;
        }
 
        /* strdup() here for v1 hierarchies. Otherwise strtok_r() will destroy