From 5e4f7ac4c8ec5cf319b3e0aa81cd8dfcf7d23f94 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 10 Jan 2017 11:36:03 +0000 Subject: [PATCH] [Fix] Plug memory leak in lua_tcp --- src/lua/lua_tcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c index 9cb246df4..5e07c75dd 100644 --- a/src/lua/lua_tcp.c +++ b/src/lua/lua_tcp.c @@ -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; } -- 2.39.5