tmpfiles: fix memory leak of exclude_prefixes

Missed in 5c795114.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-01-30 21:40:27 -05:00
parent ba91431154
commit 498f8a39e6

View file

@ -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);