diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-01-27 15:22:01 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-01-27 15:22:01 +0000 |
commit | ec72b3f03d16e6ca84a9035b308048fe5abe3cda (patch) | |
tree | 5e800f1ad1dae02c059338f135d2552acc26bd41 /src/libutil | |
parent | d10ece3bad807614f1d0c728d95af0205ef811fe (diff) | |
download | rspamd-ec72b3f03d16e6ca84a9035b308048fe5abe3cda.tar.gz rspamd-ec72b3f03d16e6ca84a9035b308048fe5abe3cda.zip |
[Minor] Allocate larger config static pool
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/mem_pool.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c index f45bf8857..4b4875699 100644 --- a/src/libutil/mem_pool.c +++ b/src/libutil/mem_pool.c @@ -354,7 +354,13 @@ rspamd_mempool_new_ (gsize size, const gchar *tag, const gchar *loc) sizeof (struct _pool_destructors), 32); rspamd_mempool_create_pool_type (new, RSPAMD_MEMPOOL_NORMAL); /* Set it upon first call of set variable */ - new->elt_len = new->entry->cur_suggestion; + + if (size == 0) { + new->elt_len = new->entry->cur_suggestion; + } + else { + new->elt_len = size; + } if (tag) { rspamd_strlcpy (new->tag.tagname, tag, sizeof (new->tag.tagname)); |