summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/coredumpctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 5a6c897074..2158d73771 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -601,8 +601,10 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
}
if (filename && !endswith(filename, ".xz")) {
- *path = filename;
- filename = NULL;
+ if (path) {
+ *path = filename;
+ filename = NULL;
+ }
return 0;
} else {