aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/lc-btrie
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-30 12:12:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-30 12:12:17 +0100
commit03165efaa67359fdcabb6206ed02cba36498be5a (patch)
tree50038339a41fafec68ca80e547c27824b94e3b16 /contrib/lc-btrie
parentac77a153fea7cfc809ce6a546f2eb4fccf3cbd53 (diff)
downloadrspamd-03165efaa67359fdcabb6206ed02cba36498be5a.tar.gz
rspamd-03165efaa67359fdcabb6206ed02cba36498be5a.zip
[Minor] Try to fix some memory inconsistencies
Diffstat (limited to 'contrib/lc-btrie')
-rw-r--r--contrib/lc-btrie/btrie.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/lc-btrie/btrie.c b/contrib/lc-btrie/btrie.c
index d95bf0676..51357a1d6 100644
--- a/contrib/lc-btrie/btrie.c
+++ b/contrib/lc-btrie/btrie.c
@@ -1380,9 +1380,10 @@ btrie_init(rspamd_mempool_t *mp)
{
struct btrie *btrie;
- if (!(btrie = rspamd_mempool_alloc (mp, sizeof(*btrie))))
+ if (!(btrie = rspamd_mempool_alloc0 (mp, sizeof(*btrie)))) {
return NULL;
- memset(btrie, 0, sizeof(*btrie));
+ }
+
btrie->mp = mp;
btrie->alloc_total = sizeof(*btrie);