summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/journal/sd-journal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index f7f1777fef..82cacf3674 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1658,6 +1658,8 @@ _public_ void sd_journal_close(sd_journal *j) {
if (!j)
return;
+ sd_journal_flush_matches(j);
+
while ((f = hashmap_steal_first(j->files)))
journal_file_close(f);
@@ -1675,8 +1677,6 @@ _public_ void sd_journal_close(sd_journal *j) {
if (j->inotify_fd >= 0)
close_nointr_nofail(j->inotify_fd);
- sd_journal_flush_matches(j);
-
if (j->mmap)
mmap_cache_unref(j->mmap);