From 7672a0ae2ef3ea7d6c79f1f9de5f3d9d1cd84b85 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 17 Jan 2017 16:52:45 +0000 Subject: [Fix] Plug reload leaks --- src/rspamd_proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rspamd_proxy.c') diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index d4a2c1b57..8e2b205b7 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -620,7 +620,8 @@ init_rspamd_proxy (struct rspamd_config *cfg) type = g_quark_try_string ("rspamd_proxy"); - ctx = g_malloc0 (sizeof (struct rspamd_proxy_ctx)); + ctx = rspamd_mempool_alloc (cfg->cfg_pool, + sizeof (struct rspamd_proxy_ctx)); ctx->magic = rspamd_rspamd_proxy_magic; ctx->timeout = 10.0; ctx->upstreams = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal); -- cgit v1.2.3