summaryrefslogtreecommitdiff
path: root/src/sysctl
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysctl')
-rw-r--r--src/sysctl/sysctl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
index 7ebe1e2df5..57112a7ef9 100644
--- a/src/sysctl/sysctl.c
+++ b/src/sysctl/sysctl.c
@@ -251,13 +251,9 @@ static int parse_argv(int argc, char *argv[]) {
if (*p == '.')
*p = '/';
- l = strv_append(arg_prefixes, optarg);
- if (!l)
+ if (strv_extend(&arg_prefixes, optarg) < 0)
return log_oom();
- strv_free(arg_prefixes);
- arg_prefixes = l;
-
break;
}