summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/journal-file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index d06dbc2f75..8a2c0fcac5 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1380,9 +1380,10 @@ static void chain_cache_put(
if (array == first)
return;
- if (ordered_hashmap_size(h) >= CHAIN_CACHE_MAX)
+ if (ordered_hashmap_size(h) >= CHAIN_CACHE_MAX) {
ci = ordered_hashmap_steal_first(h);
- else {
+ assert(ci);
+ } else {
ci = new(ChainCacheItem, 1);
if (!ci)
return;