aboutsummaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-21 13:16:47 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-21 13:18:54 +0000
commit75d23a996808fc0cc6540b0dbbfa195cc9c4b538 (patch)
tree4d69010ef993d537396b00a96d2b0645f145620b /src/controller.c
parenta037e79dba7125d2ef3893c967538706ecd422f2 (diff)
downloadrspamd-75d23a996808fc0cc6540b0dbbfa195cc9c4b538.tar.gz
rspamd-75d23a996808fc0cc6540b0dbbfa195cc9c4b538.zip
[Minor] Correct order of deinitialization
Diffstat (limited to 'src/controller.c')
-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);
}