@@ -3051,7 +3051,8 @@ init_controller_worker (struct rspamd_config *cfg) | |||
type = g_quark_try_string ("controller"); | |||
ctx = g_malloc0 (sizeof (struct rspamd_controller_worker_ctx)); | |||
ctx = rspamd_mempool_alloc0 (cfg->cfg_pool, | |||
sizeof (struct rspamd_controller_worker_ctx)); | |||
ctx->magic = rspamd_controller_ctx_magic; | |||
ctx->timeout = DEFAULT_WORKER_IO_TIMEOUT; |
@@ -2021,7 +2021,8 @@ init_fuzzy (struct rspamd_config *cfg) | |||
type = g_quark_try_string ("fuzzy"); | |||
ctx = g_malloc0 (sizeof (struct rspamd_fuzzy_storage_ctx)); | |||
ctx = rspamd_mempool_alloc0 (cfg->cfg_pool, | |||
sizeof (struct rspamd_fuzzy_storage_ctx)); | |||
ctx->magic = rspamd_fuzzy_storage_magic; | |||
ctx->sync_timeout = DEFAULT_SYNC_TIMEOUT; |
@@ -62,7 +62,7 @@ init_hs_helper (struct rspamd_config *cfg) | |||
GQuark type; | |||
type = g_quark_try_string ("hs_helper"); | |||
ctx = g_malloc0 (sizeof (*ctx)); | |||
ctx = rspamd_mempool_alloc0 (cfg->cfg_pool, sizeof (*ctx)); | |||
ctx->magic = rspamd_hs_helper_magic; | |||
ctx->cfg = cfg; |
@@ -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); |
@@ -488,7 +488,8 @@ init_worker (struct rspamd_config *cfg) | |||
type = g_quark_try_string ("normal"); | |||
ctx = g_malloc0 (sizeof (struct rspamd_worker_ctx)); | |||
ctx = rspamd_mempool_alloc (cfg->cfg_pool, | |||
sizeof (struct rspamd_worker_ctx)); | |||
ctx->magic = rspamd_worker_magic; | |||
ctx->is_mime = TRUE; |