]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not remove not owned mempool
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 23 Dec 2016 00:23:54 +0000 (00:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 23 Dec 2016 00:23:54 +0000 (00:23 +0000)
src/lua/lua_util.c

index 923713783a1c9b7a8fe49212338b59b6a904e15e..95471601bdefded48869ad39ed5581ffcedb7c51 100644 (file)
@@ -1073,7 +1073,9 @@ lua_util_parse_addr (lua_State *L)
                        lua_push_emails_address_list (L, addrs);
                }
 
-               rspamd_mempool_delete (pool);
+               if (own_pool) {
+                       rspamd_mempool_delete (pool);
+               }
        }
        else {
                lua_pushnil (L);
@@ -1251,7 +1253,9 @@ lua_util_parse_mail_address (lua_State *L)
                        lua_push_emails_address_list (L, addrs);
                }
 
-               rspamd_mempool_delete (pool);
+               if (own_pool) {
+                       rspamd_mempool_delete (pool);
+               }
        }
        else {
                lua_pushnil (L);