From bc6c18fef106ca53a975968df298bce339490214 Mon Sep 17 00:00:00 2001 From: reverendhomer Date: Thu, 1 Oct 2015 12:09:00 +0300 Subject: systemctl: fix memory leak in systemctl_parse_argv This commit fixes Coverity #1325228 --- src/systemctl/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 6d33badba4..0615dd6aa5 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -6860,7 +6860,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) { size_t size; FOREACH_WORD_SEPARATOR(word, size, optarg, ",", state) { - char *s; + _cleanup_free_ char *s = NULL; s = strndup(word, size); if (!s) -- cgit v1.2.3-54-g00ecf