journald: fixed assertion failure when system journal rotation fails (#9893)

This commit is contained in:
Renaud Métrich 2018-09-03 05:42:39 +02:00 committed by Yu Watanabe
parent a70f343cac
commit fd790d6f09
1 changed files with 2 additions and 1 deletions

View File

@ -1035,7 +1035,8 @@ int server_flush_to_var(Server *s, bool require_flag_file) {
r = 0;
finish:
journal_file_post_change(s->system_journal);
if (s->system_journal)
journal_file_post_change(s->system_journal);
s->runtime_journal = journal_file_close(s->runtime_journal);