teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0696-journald-fixed-assertion-failure-when-system-journal.patch

923a60
From 7b82ce4a8457639d225449f3d345138c9f4f5ad9 Mon Sep 17 00:00:00 2001
923a60
From: =?UTF-8?q?Renaud=20M=C3=A9trich?=
923a60
 <1163635+rmetrich@users.noreply.github.com>
923a60
Date: Mon, 3 Sep 2018 05:42:39 +0200
923a60
Subject: [PATCH] journald: fixed assertion failure when system journal
923a60
 rotation fails (#9893)
923a60
923a60
(cherry picked from commit fd790d6f09b10a87b007b71403cb018f18ff91c9)
923a60
Resolves: #1619543
923a60
---
923a60
 src/journal/journald-server.c | 3 ++-
923a60
 1 file changed, 2 insertions(+), 1 deletion(-)
923a60
923a60
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
923a60
index 88d8f3e41d..88cf0b2d53 100644
923a60
--- a/src/journal/journald-server.c
923a60
+++ b/src/journal/journald-server.c
923a60
@@ -1180,7 +1180,8 @@ int server_flush_to_var(Server *s, bool require_flag_file) {
923a60
         }
923a60
 
923a60
 finish:
923a60
-        journal_file_post_change(s->system_journal);
923a60
+        if (s->system_journal)
923a60
+                journal_file_post_change(s->system_journal);
923a60
 
923a60
         journal_file_close(s->runtime_journal);
923a60
         s->runtime_journal = NULL;