From 26d08cd65af6bd013d5a48b7d27f577d917cdbdc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 6 Sep 2017 19:28:14 +0100 Subject: [Minor] Zero structure before usage --- src/lua/lua_cfg_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lua/lua_cfg_file.c') diff --git a/src/lua/lua_cfg_file.c b/src/lua/lua_cfg_file.c index 571278b21..f564f1e79 100644 --- a/src/lua/lua_cfg_file.c +++ b/src/lua/lua_cfg_file.c @@ -86,7 +86,7 @@ lua_process_metric (lua_State *L, const gchar *name, struct rspamd_config *cfg) s->weight_ptr = score; } else { - s = rspamd_mempool_alloc (cfg->cfg_pool, sizeof (*s)); + s = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*s)); s->name = symbol; s->weight_ptr = score; g_hash_table_insert (metric->symbols, symbol, s); -- cgit v1.2.3