summaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-10 13:59:27 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-10 13:59:27 +0000
commit653ecce56f9215b189f9b0b556e79a6a7951e032 (patch)
treef3ba83cd151c128f6ac5cf17044aa31c8b30d915 /src/worker.c
parent26a8dbfd045ae44a55dd3c690ac370806afa213f (diff)
downloadrspamd-653ecce56f9215b189f9b0b556e79a6a7951e032.tar.gz
rspamd-653ecce56f9215b189f9b0b556e79a6a7951e032.zip
[Fix] Plug termination memory leaks
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/worker.c b/src/worker.c
index 7b0373c9e..e7d71a99d 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -82,6 +82,7 @@ rspamd_worker_finalize (gpointer user_data)
msg_info_task ("finishing actions has been processed, terminating");
event_base_loopexit (task->ev_base, &tv);
+ rspamd_session_destroy (task->s);
return TRUE;
}
@@ -111,6 +112,8 @@ rspamd_worker_call_finish_handlers (struct rspamd_worker *worker)
}
if (rspamd_session_pending (task->s)) {
+ rspamd_session_destroy (task->s);
+
return TRUE;
}
}
@@ -599,7 +602,6 @@ start_worker (struct rspamd_worker *worker)
struct rspamd_worker_log_pipe *lp, *ltmp;
ctx->cfg = worker->srv->cfg;
- REF_RETAIN (ctx->cfg);
ctx->ev_base = rspamd_prepare_worker (worker, "normal", accept_socket, TRUE);
msec_to_tv (ctx->timeout, &ctx->io_tv);
rspamd_symbols_cache_start_refresh (worker->srv->cfg->cache, ctx->ev_base);