]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not leak memory
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 6 Aug 2021 14:22:07 +0000 (15:22 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 6 Aug 2021 14:22:07 +0000 (15:22 +0100)
lualib/rspamadm/dmarc_report.lua

index d9ae40e9945639e8e584d7b00beb2b85558142c7..1640292481f4b578aa4633e5d688878a06276e9f 100644 (file)
@@ -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())