summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2012-08-20 14:52:07 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-08-23 13:53:30 +0200
commit032f81645b3a60be316d7a0ed1e84443aa8737ba (patch)
tree0dd0a198c200c7eafec0a1df0f5d3de47b644755 /src/core/main.c
parenta34faf579d2be139b0b9e8cd0c73ad4d918ef736 (diff)
core: free word later in parse_proc_cmdline
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/main.c b/src/core/main.c
index b50a1ca215..12af3cdd27 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -727,12 +727,13 @@ static int parse_proc_cmdline(void) {
}
r = parse_proc_cmdline_word(word);
- free(word);
-
if (r < 0) {
log_error("Failed on cmdline argument %s: %s", word, strerror(-r));
+ free(word);
goto finish;
}
+
+ free(word);
}
r = 0;