aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/controller.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/controller.c b/src/controller.c
index 675671aa0..44899632e 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -2813,14 +2813,15 @@ rspamd_controller_finish_handler (struct rspamd_http_connection_entry *conn_ent)
rspamd_session_destroy (session->task->s);
}
+ session->wrk->nconns --;
+ rspamd_inet_address_destroy (session->from_addr);
+ REF_RELEASE (session->cfg);
+
if (session->pool) {
- rspamd_mempool_delete (session->pool);
msg_debug_session ("destroy session %p", session);
+ rspamd_mempool_delete (session->pool);
}
- session->wrk->nconns --;
- rspamd_inet_address_destroy (session->from_addr);
- REF_RELEASE (session->cfg);
g_slice_free1 (sizeof (struct rspamd_controller_session), session);
}