]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Forgotten worker
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Jan 2017 16:53:43 +0000 (16:53 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Jan 2017 16:53:43 +0000 (16:53 +0000)
src/lua_worker.c

index 624eb2082bb78b8febf34e39ea4ed834d4c79ced..bd0a53a81709050fab4a6d51f075f364fd4039bc 100644 (file)
@@ -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,