summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-05 21:34:24 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-01-09 23:41:53 +0100
commitf0136e09221364f931c3a3b715da4e4d3ee9f2ac (patch)
tree721479612c649daf3edd5c0d107726734ace72ca /src
parent2d5d2e0cc5171c6795d2a485841474345d9e30ab (diff)
downloadsystemd-f0136e09221364f931c3a3b715da4e4d3ee9f2ac.tar.gz
coredump: fix message when we fail to save a journald coredump
If creation of the message failed, we'd write a bogus entry: systemd-coredump[1400]: Cannot store coredump of 416 (systemd-journal): No space left on device systemd-coredump[1400]: MESSAGE=Process 416 (systemd-journal) of user 0 dumped core. systemd-coredump[1400]: Coredump diverted to
Diffstat (limited to 'src')
-rw-r--r--src/coredump/coredump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index db2cf64dd5..516f63d3e0 100644
--- a/src/coredump/coredump.c
+++ b/src/coredump/coredump.c
@@ -794,8 +794,8 @@ log:
core_message = strjoin("MESSAGE=Process ", context[CONTEXT_PID],
" (", context[CONTEXT_COMM], ") of user ",
context[CONTEXT_UID], " dumped core.",
- journald_crash ? "\nCoredump diverted to " : NULL,
- journald_crash ? filename : NULL);
+ journald_crash && filename ? "\nCoredump diverted to " : NULL,
+ journald_crash && filename ? filename : NULL);
if (!core_message)
return log_oom();