]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl: free all command line argument objects
authorLennart Poettering <lennart@poettering.net>
Mon, 18 May 2015 21:54:05 +0000 (23:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 May 2015 22:26:48 +0000 (00:26 +0200)
let's try to be valgrind clean

src/journal/journalctl.c

index fa2be3b55ff9e304f5815c5fe0a08f07846f76eb..3a59d7ff1be985436527155d039917a0021d636b 100644 (file)
@@ -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;
 }