]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Avoid mempool leak in SA plugin on reload
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Jan 2017 19:08:13 +0000 (19:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Jan 2017 19:08:35 +0000 (19:08 +0000)
src/plugins/lua/spamassassin.lua

index a02ce8306d91822e678adcb99a794580178e6852..3434a437313a74c50872980bc988ccbc5b2bf15a 100644 (file)
@@ -92,7 +92,6 @@ local external_deps = {}
 local freemail_domains = {}
 local pcre_only_regexps = {}
 local freemail_trie
-local sa_mempool = rspamd_mempool.create()
 local replace = {
   tags = {},
   pre = {},
@@ -1448,7 +1447,7 @@ local function post_process()
         return res
       end
       expression = rspamd_expression.create(r['meta'],
-        {parse_atom, process_atom}, sa_mempool)
+        {parse_atom, process_atom}, rspamd_config:get_mempool())
       if not expression then
         rspamd_logger.errx(rspamd_config, 'Cannot parse expression ' .. r['meta'])
       else