From: Yu Watanabe Date: Sat, 29 Apr 2023 22:02:34 +0000 (+0900) Subject: sd-journal: check that the journal file is not stored in .newest_by_boot_id on free X-Git-Tag: v254-rc1~586^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b895f56c64d35dba0751c9eb63b1caf13187d22;p=thirdparty%2Fsystemd.git sd-journal: check that the journal file is not stored in .newest_by_boot_id on free --- diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c index f6a86fe5999..cf18732d797 100644 --- a/src/libsystemd/sd-journal/journal-file.c +++ b/src/libsystemd/sd-journal/journal-file.c @@ -285,6 +285,8 @@ JournalFile* journal_file_close(JournalFile *f) { if (!f) return NULL; + assert(f->newest_boot_id_prioq_idx == PRIOQ_IDX_NULL); + if (f->cache_fd) mmap_cache_fd_free(f->cache_fd);