summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_tcp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-21 12:13:44 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-21 12:13:44 +0100
commit7fee396041bb1250086c76517c02d8471c93a40c (patch)
tree91c48f10ee17d9c21da5cdadac8dad03159c927f /src/lua/lua_tcp.c
parent077cee773330eda0b994b7b70fa1d6ec307db478 (diff)
downloadrspamd-7fee396041bb1250086c76517c02d8471c93a40c.tar.gz
rspamd-7fee396041bb1250086c76517c02d8471c93a40c.zip
[Minor] Fix some more issues
Found by: coverity scan
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");
}