]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Plug memory leak in lua_tcp
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 10 Jan 2017 11:36:03 +0000 (11:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 10 Jan 2017 11:36:03 +0000 (11:36 +0000)
src/lua/lua_tcp.c

index 9cb246df40ffe04c65bb644ba45d691d8d7ddc0c..5e07c75dd9815f5432eaae503d05cfa709b9eb08 100644 (file)
@@ -851,6 +851,7 @@ lua_tcp_arg_toiovec (lua_State *L, gint pos, struct lua_tcp_cbdata *cbd,
                dtor = g_slice_alloc0 (sizeof (*dtor));
                dtor->dtor = g_free;
                dtor->data = (void *)vec->iov_base;
+               LL_PREPEND (cbd->dtors, dtor);
                memcpy (vec->iov_base, str, len);
                vec->iov_len = len;
        }