summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-30 21:40:27 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-30 22:53:01 -0500
commit498f8a39e66a62d015ac78e67e2504658bbba5f2 (patch)
tree4d2870f95d4efd39c665d6f1e30100c1cc55607c /src/tmpfiles/tmpfiles.c
parentba91431154ad7bac82ddf0a540ec1b40db62d782 (diff)
tmpfiles: fix memory leak of exclude_prefixes
Missed in 5c795114.
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r--src/tmpfiles/tmpfiles.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index bff95271f5..b0efa37e20 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1343,12 +1343,12 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_PREFIX:
- if (strv_extend(&include_prefixes, optarg) < 0)
+ if (strv_push(&include_prefixes, optarg) < 0)
return log_oom();
break;
case ARG_EXCLUDE_PREFIX:
- if (strv_extend(&exclude_prefixes, optarg) < 0)
+ if (strv_push(&exclude_prefixes, optarg) < 0)
return log_oom();
break;
@@ -1508,7 +1508,8 @@ finish:
hashmap_free(items);
hashmap_free(globs);
- strv_free(include_prefixes);
+ free(include_prefixes);
+ free(exclude_prefixes);
set_free_free(unix_sockets);