1abbee
From 4cbe0933587385ed0d811ce11264d65d15b05cfd Mon Sep 17 00:00:00 2001
1abbee
From: Lennart Poettering <lennart@poettering.net>
1abbee
Date: Mon, 18 May 2015 23:54:05 +0200
1abbee
Subject: [PATCH] journalctl: free all command line argument objects
1abbee
1abbee
let's try to be valgrind clean
1abbee
1abbee
Cherry-picked from: d52da2057f06c49d50ed99300dc407c0227b1a32
1abbee
Related: #1318994
1abbee
---
1abbee
 src/journal/journalctl.c | 8 ++++----
1abbee
 1 file changed, 4 insertions(+), 4 deletions(-)
1abbee
1abbee
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
c62b8e
index 31da357c1b..92ee3fb27d 100644
1abbee
--- a/src/journal/journalctl.c
1abbee
+++ b/src/journal/journalctl.c
1abbee
@@ -39,7 +39,6 @@
1abbee
 
1abbee
 #include "sd-journal.h"
1abbee
 #include "sd-bus.h"
1abbee
-
1abbee
 #include "log.h"
1abbee
 #include "logs-show.h"
1abbee
 #include "util.h"
1abbee
@@ -2003,9 +2002,6 @@ int main(int argc, char *argv[]) {
1abbee
                 goto finish;
1abbee
 
1abbee
         r = add_units(j);
1abbee
-        strv_free(arg_system_units);
1abbee
-        strv_free(arg_user_units);
1abbee
-
1abbee
         if (r < 0) {
1abbee
                 log_error_errno(r, "Failed to add filter for units: %m");
1abbee
                 goto finish;
1abbee
@@ -2283,5 +2279,9 @@ finish:
1abbee
 
1abbee
         strv_free(arg_file);
1abbee
 
1abbee
+        strv_free(arg_syslog_identifier);
1abbee
+        strv_free(arg_system_units);
1abbee
+        strv_free(arg_user_units);
1abbee
+
1abbee
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
1abbee
 }