projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ce8d60
)
systemctl: fix memory leak in systemctl_parse_argv
author
reverendhomer
<mk.43.ecko@gmail.com>
Thu, 1 Oct 2015 09:09:00 +0000
(12:09 +0300)
committer
reverendhomer
<mk.43.ecko@gmail.com>
Thu, 1 Oct 2015 09:09:00 +0000
(12:09 +0300)
This commit fixes Coverity #
1325228
src/systemctl/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index 6d33badba48f0becf50e4cd089cb705212d8bed4..0615dd6aa5fe4c8fbf078da7f40a92690bb76927 100644
(file)
--- 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)