]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Small fixes in lua api
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Dec 2016 18:08:33 +0000 (18:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Dec 2016 18:08:33 +0000 (18:08 +0000)
src/lua/lua_mempool.c
src/lua/lua_util.c

index 38482748f3b093af680ba24f4984aef0a2dc5097..8fe8b5cc3814e677f4d42407c8464f30c62d9f4f 100644 (file)
@@ -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 *));
index 03afb2913a5761d81241867d32cd1447c2ba6249..3a12731c58403768afc82d1b7c8ebbdc9d95f3ce 100644 (file)
@@ -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;
                        }
                }
        }