summaryrefslogtreecommitdiff
path: root/src/journal/mmap-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/mmap-cache.c')
-rw-r--r--src/journal/mmap-cache.c5
1 files changed, 4 insertions, 1 deletions
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 --;