From: Vsevolod Stakhov Date: Tue, 10 Jan 2017 11:36:03 +0000 (+0000) Subject: [Fix] Plug memory leak in lua_tcp X-Git-Tag: 1.5.0~387 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e4f7ac4c8ec5cf319b3e0aa81cd8dfcf7d23f94;p=thirdparty%2Frspamd.git [Fix] Plug memory leak in lua_tcp --- diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c index 9cb246df40..5e07c75dd9 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; }