mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
Merge pull request #1434 from reverendhomer/patch-1
systemctl: fix memory leak in systemctl_parse_argv
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user