pid1: do not initialize join_controllers by default

We're moving towards unified cgroup hierarchy where this is not necessary.
This makes main.c a bit simpler.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-02-19 15:18:54 +01:00
parent 9ecdba8cb7
commit 56c8d7444a
4 changed files with 30 additions and 37 deletions
+11
View File
@@ -1120,6 +1120,17 @@ int config_parse_join_controllers(
if (!isempty(rvalue))
log_syntax(unit, LOG_ERR, filename, line, 0, "Trailing garbage, ignoring.");
/* As a special case, return a single empty strv, to override the default */
if (!controllers) {
controllers = new(char**, 2);
if (!controllers)
return log_oom();
controllers[0] = strv_new(NULL, NULL);
if (!controllers[0])
return log_oom();
controllers[1] = NULL;
}
strv_free_free(*ret);
*ret = controllers;
controllers = NULL;