summaryrefslogtreecommitdiff
path: root/src/shared/logs-show.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-16 14:45:28 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-16 22:41:47 -0400
commit4ad16808c02e3eb6c1ec8500b3d086cc28e9b75a (patch)
tree64d0d5fb4bb0905217ba4e1af3e4958dff64926f /src/shared/logs-show.c
parent248fc619b5e3e24d78f171f95b85916eee7987bd (diff)
journalctl,systemctl: fix tiny memleak
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r--src/shared/logs-show.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index 8dc11bb7fd..ea4746879b 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -1059,7 +1059,12 @@ int show_journal_by_unit(
if (r < 0)
return r;
- log_debug("Journal filter: %s", journal_make_match_string(j));
+ if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+ _cleanup_free_ char *filter;
+
+ filter = journal_make_match_string(j);
+ log_debug("Journal filter: %s", filter);
+ }
r = show_journal(f, j, mode, n_columns, not_before, how_many, flags);
if (r < 0)