cgroups/cgfsng: fix get_controllers() for cgroup2

parent e2695f0e
...@@ -786,7 +786,7 @@ static char **get_controllers(char **klist, char **nlist, char *line) ...@@ -786,7 +786,7 @@ static char **get_controllers(char **klist, char **nlist, char *line)
/* cgroup v2 does not have separate mountpoints for controllers */ /* cgroup v2 does not have separate mountpoints for controllers */
if (is_cgroup_v2) { if (is_cgroup_v2) {
must_append_controller(klist, nlist, &aret, "cgroup2"); must_append_controller(klist, nlist, &aret, "cgroup2");
return NULL; return aret;
} }
/* strdup() here for v1 hierarchies. Otherwise strtok_r() will destroy /* strdup() here for v1 hierarchies. Otherwise strtok_r() will destroy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment