journal: don't access j->files after use

https://bugs.freedesktop.org/show_bug.cgi?id=62605
This commit is contained in:
Lennart Poettering
2013-03-23 04:14:20 +01:00
parent 46512cd959
commit 54b1da83ed
+2 -2
View File
@@ -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);