From 0bb9a7f42c71deb13c1ad9477062a61e36524b42 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 17 Jan 2017 16:53:43 +0000 Subject: [Fix] Forgotten worker --- src/lua_worker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lua_worker.c') diff --git a/src/lua_worker.c b/src/lua_worker.c index 624eb2082..bd0a53a81 100644 --- a/src/lua_worker.c +++ b/src/lua_worker.c @@ -311,7 +311,8 @@ init_lua_worker (struct rspamd_config *cfg) type = g_quark_try_string ("lua"); - ctx = g_malloc0 (sizeof (struct rspamd_lua_worker_ctx)); + ctx = rspamd_mempool_alloc (cfg->cfg_pool, + sizeof (struct rspamd_lua_worker_ctx)); ctx->magic = rspamd_lua_ctx_magic; ctx->params = g_hash_table_new_full (rspamd_str_hash, rspamd_str_equal, -- cgit v1.2.3