summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-18 23:54:05 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-19 00:26:48 +0200
commitd52da2057f06c49d50ed99300dc407c0227b1a32 (patch)
tree6399dab5cbce615d0f8ccdb2149523b302124ef9 /src
parent909dea0c7ced0042fa3acd8cd05f5007a2cf2cea (diff)
journalctl: free all command line argument objects
let's try to be valgrind clean
Diffstat (limited to 'src')
-rw-r--r--src/journal/journalctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index fa2be3b55f..3a59d7ff1b 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -37,7 +37,6 @@
#include "sd-journal.h"
#include "sd-bus.h"
-
#include "log.h"
#include "logs-show.h"
#include "util.h"
@@ -1915,8 +1914,6 @@ int main(int argc, char *argv[]) {
goto finish;
r = add_units(j);
- arg_system_units = strv_free(arg_system_units);
- arg_user_units = strv_free(arg_user_units);
if (r < 0) {
log_error_errno(r, "Failed to add filter for units: %m");
goto finish;
@@ -2183,5 +2180,9 @@ finish:
strv_free(arg_file);
+ strv_free(arg_syslog_identifier);
+ strv_free(arg_system_units);
+ strv_free(arg_user_units);
+
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}