diff options
author | Tom Gundersen <teg@jklm.no> | 2015-12-10 15:22:18 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-12-10 15:22:18 +0100 |
commit | 553947b77c3232d5795cbb2cd1129e74cb11c86d (patch) | |
tree | d2d8d8fb86dd315cf80c03ac4e2c25b5c7b13d35 /src/journal | |
parent | 312501458d119704e27e14ef59a18f612757421c (diff) | |
parent | c842ff2488456f503db365430592d02b8c251fa5 (diff) |
Merge pull request #2129 from poettering/dnssec3
Third DNSSEC patch series
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journal-file.c | 3 | ||||
-rw-r--r-- | src/journal/mmap-cache.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index f9ff9545dd..6f09301521 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -169,8 +169,7 @@ JournalFile* journal_file_close(JournalFile *f) { safe_close(f->fd); free(f->path); - if (f->mmap) - mmap_cache_unref(f->mmap); + mmap_cache_unref(f->mmap); ordered_hashmap_free_free(f->chain_cache); diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c index 5a07ddda76..eb4b092e80 100644 --- a/src/journal/mmap-cache.c +++ b/src/journal/mmap-cache.c @@ -348,7 +348,10 @@ static void mmap_cache_free(MMapCache *m) { } MMapCache* mmap_cache_unref(MMapCache *m) { - assert(m); + + if (!m) + return NULL; + assert(m->n_ref > 0); m->n_ref --; |