aboutsummaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/worker.c b/src/worker.c
index bf50e5210..94ef2c9d1 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -488,7 +488,7 @@ init_worker (struct rspamd_config *cfg)
type = g_quark_try_string ("normal");
- ctx = rspamd_mempool_alloc (cfg->cfg_pool,
+ ctx = rspamd_mempool_alloc0 (cfg->cfg_pool,
sizeof (struct rspamd_worker_ctx));
ctx->magic = rspamd_worker_magic;
@@ -638,10 +638,6 @@ start_worker (struct rspamd_worker *worker)
rspamd_stat_close ();
rspamd_log_close (worker->srv->logger);
- if (ctx->key) {
- rspamd_keypair_unref (ctx->key);
- }
-
rspamd_keypair_cache_destroy (ctx->keys_cache);
DL_FOREACH_SAFE (ctx->log_pipes, lp, ltmp) {