[systemd-commits] src/journal
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Mar 22 20:14:43 PDT 2013
src/journal/sd-journal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 54b1da83ed8cadde4a53b541a48ce303ade862f7
Author: Lennart Poettering <lennart at poettering.net>
Date: Sat Mar 23 04:11:23 2013 +0100
journal: don't access j->files after use
https://bugs.freedesktop.org/show_bug.cgi?id=62605
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index f7f1777..82cacf3 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);
More information about the systemd-commits
mailing list