summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_tcp.c')
-rw-r--r--src/lua/lua_tcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c
index a1c1f0b20..f15e25399 100644
--- a/src/lua/lua_tcp.c
+++ b/src/lua/lua_tcp.c
@@ -1521,6 +1521,8 @@ lua_tcp_request (lua_State *L)
event_loop = *(struct ev_loop **)lua_touserdata (L, -1);
}
else {
+ g_free (cbd);
+
return luaL_error (L, "event loop is required");
}
lua_pop (L, 1);
@@ -1693,6 +1695,8 @@ lua_tcp_request (lua_State *L)
if (resolver == NULL && cfg == NULL && task == NULL) {
g_free (cbd);
+ g_free (iov);
+
return luaL_error (L, "tcp request has bad params: one of "
"{resolver,task,config} should be set");
}