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