aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-26 22:22:09 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-26 22:22:09 +0000
commitabac73e5d24c9b1c79ccb179aac069df0e1d4ede (patch)
treed01425b3e9f3216b941b24ebc42d25f1f70dd746 /src
parenteb6e28e07f9108ff9a5f5711cb8f43662a8fa0fe (diff)
downloadrspamd-abac73e5d24c9b1c79ccb179aac069df0e1d4ede.tar.gz
rspamd-abac73e5d24c9b1c79ccb179aac069df0e1d4ede.zip
Avoid use-after-free.
Diffstat (limited to 'src')
-rw-r--r--src/controller.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/controller.c b/src/controller.c
index dde2944f5..55f1a3bd5 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -2021,16 +2021,18 @@ rspamd_controller_finish_handler (struct rspamd_http_connection_entry *conn_ent)
struct rspamd_controller_session *session = conn_ent->ud;
session->ctx->worker->srv->stat->control_connections_count++;
+ msg_debug_session ("destroy session %p", session);
+
if (session->task != NULL) {
rspamd_session_destroy (session->task->s);
}
+
if (session->pool) {
rspamd_mempool_delete (session->pool);
}
session->wrk->nconns --;
rspamd_inet_address_destroy (session->from_addr);
- msg_debug_session ("destroy session %p", session);
g_slice_free1 (sizeof (struct rspamd_controller_session), session);
}