summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-23 08:28:10 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-24 00:25:04 -0400
commita6b26d9011de60e1c41f51e8d2aab1d2f7bbf0f5 (patch)
treedaf0eff65c59b6566992b3d4fff94d6205857e16 /src/core/main.c
parent90ae6c0b822bbfd433c801d7945cadcabd1bc1c3 (diff)
Small cleanup
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 6a981a0b7e..ab2ac00d76 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -522,9 +522,6 @@ static void strv_free_free(char ***l) {
}
static void free_join_controllers(void) {
- if (!arg_join_controllers)
- return;
-
strv_free_free(arg_join_controllers);
arg_join_controllers = NULL;
}
@@ -1219,14 +1216,14 @@ static int initialize_join_controllers(void) {
return -ENOMEM;
arg_join_controllers[0] = strv_new("cpu", "cpuacct", NULL);
- if (!arg_join_controllers[0])
- return -ENOMEM;
-
arg_join_controllers[1] = strv_new("net_cls", "net_prio", NULL);
- if (!arg_join_controllers[1])
+ arg_join_controllers[2] = NULL;
+
+ if (!arg_join_controllers[0] || !arg_join_controllers[1]) {
+ free_join_controllers();
return -ENOMEM;
+ }
- arg_join_controllers[2] = NULL;
return 0;
}