From 9886b3d1a4e1d823a29b8f420766f2dc82c5a2fc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 18 Jan 2017 16:09:50 +0000 Subject: [Fix] More leaks... --- src/lua/lua_regexp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lua/lua_regexp.c') diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c index 1e6122b2e..1640f8023 100644 --- a/src/lua/lua_regexp.c +++ b/src/lua/lua_regexp.c @@ -745,6 +745,10 @@ luaopen_regexp (lua_State * L) luaL_register (L, NULL, regexplib_m); rspamd_lua_add_preload (L, "rspamd_regexp", lua_load_regexp); - regexp_static_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL); + if (regexp_static_pool == NULL) { + regexp_static_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), + "regexp_lua_pool"); + } + lua_settop (L, 0); } -- cgit v1.2.3