diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-17 11:47:02 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-17 11:47:02 +0100 |
commit | 0f870719446175344b36db504c08f8e5773a8348 (patch) | |
tree | 48e0503ebeebfe5e6ab291d9d961974c706e51c7 | |
parent | 407ce92322b9f69ca3f5adf4cdc24b6edfd013c6 (diff) | |
download | rspamd-0f870719446175344b36db504c08f8e5773a8348.tar.gz rspamd-0f870719446175344b36db504c08f8e5773a8348.zip |
[Minor] Restore mempool_strdup bahaviour when arg is NULL
-rw-r--r-- | src/libutil/mem_pool.c | 3 |
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); } |