aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lua/lua_mempool.c3
-rw-r--r--src/lua/lua_util.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lua/lua_mempool.c b/src/lua/lua_mempool.c
index 38482748f..8fe8b5cc3 100644
--- a/src/lua/lua_mempool.c
+++ b/src/lua/lua_mempool.c
@@ -141,7 +141,8 @@ rspamd_lua_check_mempool (lua_State * L, gint pos)
static int
lua_mempool_create (lua_State *L)
{
- struct memory_pool_s *mempool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL), **pmempool;
+ struct memory_pool_s *mempool = rspamd_mempool_new (
+ rspamd_mempool_suggest_size (), "lua"), **pmempool;
if (mempool) {
pmempool = lua_newuserdata (L, sizeof (struct memory_pool_s *));
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 03afb2913..3a12731c5 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -688,10 +688,11 @@ lua_util_decode_base64 (lua_State *L)
if (t != NULL) {
s = t->start;
inlen = t->len;
- zero_copy = TRUE;
+
if (t->flags & RSPAMD_TEXT_FLAG_OWN) {
t->flags = 0;
grab_own = TRUE;
+ zero_copy = TRUE;
}
}
}