aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cfg_file.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-06 19:28:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-06 19:28:14 +0100
commit26d08cd65af6bd013d5a48b7d27f577d917cdbdc (patch)
tree3f44f4f9e9f8c154d54eb56a763803db6a1efd2a /src/lua/lua_cfg_file.c
parent7b207cf0f21f89f78f41ca15ef8c0bddfb5bc264 (diff)
downloadrspamd-26d08cd65af6bd013d5a48b7d27f577d917cdbdc.tar.gz
rspamd-26d08cd65af6bd013d5a48b7d27f577d917cdbdc.zip
[Minor] Zero structure before usage
Diffstat (limited to 'src/lua/lua_cfg_file.c')
-rw-r--r--src/lua/lua_cfg_file.c2
1 files changed, 1 insertions, 1 deletions
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);