From: Vsevolod Stakhov Date: Wed, 18 Jan 2017 19:08:13 +0000 (+0000) Subject: [Fix] Avoid mempool leak in SA plugin on reload X-Git-Tag: 1.5.0~304 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d35c65ce67109596db9c93cc0dd71db2d40e1ba;p=rspamd.git [Fix] Avoid mempool leak in SA plugin on reload --- 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