aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-10 11:36:03 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-10 11:36:03 +0000
commit5e4f7ac4c8ec5cf319b3e0aa81cd8dfcf7d23f94 (patch)
tree771873300af49c37e5b4e39707737bcf3d31b538
parentcefcad9e167d73bf140f9c45cbb4b01a8f6a601f (diff)
downloadrspamd-5e4f7ac4c8ec5cf319b3e0aa81cd8dfcf7d23f94.tar.gz
rspamd-5e4f7ac4c8ec5cf319b3e0aa81cd8dfcf7d23f94.zip
[Fix] Plug memory leak in lua_tcp
-rw-r--r--src/lua/lua_tcp.c1
1 files changed, 1 insertions, 0 deletions
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;
}