]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-journal: check that the journal file is not stored in .newest_by_boot_id on free
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 29 Apr 2023 22:02:34 +0000 (07:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 May 2023 05:24:55 +0000 (14:24 +0900)
src/libsystemd/sd-journal/journal-file.c

index f6a86fe599926098abf8a6d9eb98b66ad64596b8..cf18732d7970f4a6934814cbbc3408b47c3c5a57 100644 (file)
@@ -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);