summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/spamassassin.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-18 19:08:13 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-18 19:08:35 +0000
commit9d35c65ce67109596db9c93cc0dd71db2d40e1ba (patch)
treedbd1f8b7dc3f5da91edadc453b5125a2f8653266 /src/plugins/lua/spamassassin.lua
parent1f71c1ed9f596e9c34dec495da1b0d3b10004c58 (diff)
downloadrspamd-9d35c65ce67109596db9c93cc0dd71db2d40e1ba.tar.gz
rspamd-9d35c65ce67109596db9c93cc0dd71db2d40e1ba.zip
[Fix] Avoid mempool leak in SA plugin on reload
Diffstat (limited to 'src/plugins/lua/spamassassin.lua')
-rw-r--r--src/plugins/lua/spamassassin.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua
index a02ce8306..3434a4373 100644
--- a/src/plugins/lua/spamassassin.lua
+++ b/src/plugins/lua/spamassassin.lua
@@ -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