]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Zero new nodes in btrie
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 9 Mar 2016 15:55:35 +0000 (15:55 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 9 Mar 2016 15:55:35 +0000 (15:55 +0000)
contrib/lc-btrie/btrie.c

index 899b0506174822136ca093860c3853d3bcc93ad1..9d78caa9bd4cd9926c3c4a9febacf60cb8c3b7ca 100644 (file)
@@ -492,7 +492,7 @@ alloc_nodes(struct btrie *btrie, unsigned nchildren, unsigned ndata)
                }
 
                /* failed to find free hunk, allocate a fresh one */
-               hunk = rspamd_mempool_alloc (btrie->mp, n_nodes * sizeof(node_t));
+               hunk = rspamd_mempool_alloc0 (btrie->mp, n_nodes * sizeof(node_t));
                if (hunk == NULL)
                        longjmp (btrie->exception, BTRIE_ALLOC_FAILED);
                btrie->alloc_total += n_nodes * sizeof(node_t);