diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-18 16:09:50 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-18 16:09:50 +0000 |
commit | 9886b3d1a4e1d823a29b8f420766f2dc82c5a2fc (patch) | |
tree | 57f2f182ec35376d7a72b505dbc33d6171d4f4dc /src/lua/lua_regexp.c | |
parent | 99e51722286671c56cf4c25b67b6168ed5f7bfb5 (diff) | |
download | rspamd-9886b3d1a4e1d823a29b8f420766f2dc82c5a2fc.tar.gz rspamd-9886b3d1a4e1d823a29b8f420766f2dc82c5a2fc.zip |
[Fix] More leaks...
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r-- | src/lua/lua_regexp.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |