From: Vsevolod Stakhov Date: Fri, 6 Aug 2021 14:22:07 +0000 (+0100) Subject: [Minor] Do not leak memory X-Git-Tag: 3.0~40 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e2bc6faca69eeef27cf79f134d7517f424ff196d;p=rspamd.git [Minor] Do not leak memory --- diff --git a/lualib/rspamadm/dmarc_report.lua b/lualib/rspamadm/dmarc_report.lua index d9ae40e99..164029248 100644 --- a/lualib/rspamadm/dmarc_report.lua +++ b/lualib/rspamadm/dmarc_report.lua @@ -99,7 +99,7 @@ local redis_attrs = { log_obj = rspamd_config, resolver = rspamadm_dns_resolver, } -local pool = rspamd_mempool.create() +local pool local function load_config(opts) local _r,err = rspamd_config:load_ucl(opts['config']) @@ -618,6 +618,7 @@ end local function handler(args) local opts = parser:parse(args) + pool = rspamd_mempool.create() load_config(opts) rspamd_url.init(rspamd_config:get_tld_path())