mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
journal-file: fix mmap leak
https://bugzilla.redhat.com/show_bug.cgi?id=831132
This commit is contained in:
parent
2154761fbb
commit
d384c7a874
@ -67,9 +67,12 @@ void journal_file_close(JournalFile *f) {
|
||||
|
||||
assert(f);
|
||||
|
||||
if (f->header && f->writable)
|
||||
if (f->header) {
|
||||
if (f->writable)
|
||||
f->header->state = STATE_OFFLINE;
|
||||
|
||||
munmap(f->header, PAGE_ALIGN(sizeof(Header)));
|
||||
}
|
||||
|
||||
for (t = 0; t < _WINDOW_MAX; t++)
|
||||
if (f->windows[t].ptr)
|
||||
|
Loading…
Reference in New Issue
Block a user