aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/mem_pool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c
index edfb3c016..bbd302a23 100644
--- a/src/libutil/mem_pool.c
+++ b/src/libutil/mem_pool.c
@@ -605,6 +605,9 @@ rspamd_mempool_alloc_shared_(rspamd_mempool_t *pool, gsize size, gsize alignment
gchar *
rspamd_mempool_strdup_(rspamd_mempool_t *pool, const gchar *src, const gchar *loc)
{
+ if (src == NULL) {
+ return NULL;
+ }
return rspamd_mempool_strdup_len_(pool, src, strlen(src), loc);
}