summaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/mem_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c
index df8c3cb07..d17c72bb8 100644
--- a/src/libutil/mem_pool.c
+++ b/src/libutil/mem_pool.c
@@ -332,7 +332,7 @@ rspamd_mempool_new_ (gsize size, const gchar *tag, gint flags, const gchar *loc)
struct rspamd_mempool_entry_point *entry = rspamd_mempool_get_entry (loc);
gsize total_size;
- if (size == 0) {
+ if (size == 0 && entry) {
size = entry->cur_suggestion;
}