summaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-27 15:28:07 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-27 15:28:07 +0100
commit3da3ad2506b2326ca533b11b9ab8e2cebb92b63f (patch)
tree1c800b76dcb68953cd0ea141b87ed816fab46768 /src/rspamd_proxy.c
parent0cde7b0683bf3f9550ad97bfdbedc22511c1505c (diff)
downloadrspamd-3da3ad2506b2326ca533b11b9ab8e2cebb92b63f.tar.gz
rspamd-3da3ad2506b2326ca533b11b9ab8e2cebb92b63f.zip
[Minor] Further static leaks removal
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 6b1eec237..be3395273 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -2230,6 +2230,9 @@ start_rspamd_proxy (struct rspamd_worker *worker)
ctx->http_ctx = rspamd_http_context_create (ctx->cfg, ctx->event_loop,
ctx->cfg->ups_ctx);
+ rspamd_mempool_add_destructor (ctx->cfg->cfg_pool,
+ (rspamd_mempool_destruct_t)rspamd_http_context_free,
+ ctx->http_ctx);
if (ctx->has_self_scan) {
/* Additional initialisation needed */
@@ -2263,9 +2266,7 @@ start_rspamd_proxy (struct rspamd_worker *worker)
rspamd_stat_close ();
}
- struct rspamd_http_context *http_ctx = ctx->http_ctx;
REF_RELEASE (ctx->cfg);
- rspamd_http_context_free (http_ctx);
rspamd_log_close (worker->srv->logger, TRUE);
exit (EXIT_SUCCESS);