aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-18 12:29:57 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-18 12:29:57 +0100
commit4041c2d64024f27488461e03fcd587dfbb34c4b0 (patch)
tree9af52fdbc4789fc8f35f164a414431ca37710b43 /src/rspamadm
parent1589bd19ff7c841203c548de2c5897e0f0f22c6d (diff)
downloadrspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.tar.gz
rspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.zip
[Minor] Plug some leaks on error paths
Found by: coverity scan
Diffstat (limited to 'src/rspamadm')
-rw-r--r--src/rspamadm/lua_repl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c
index 3497a85b8..70ce06cd2 100644
--- a/src/rspamadm/lua_repl.c
+++ b/src/rspamadm/lua_repl.c
@@ -721,7 +721,7 @@ rspamadm_lua_accept_cb (EV_P_ ev_io *w, int revents)
{
struct rspamadm_lua_repl_context *ctx =
(struct rspamadm_lua_repl_context *)w->data;
- rspamd_inet_addr_t *addr;
+ rspamd_inet_addr_t *addr = NULL;
struct rspamadm_lua_repl_session *session;
gint nfd;
@@ -732,6 +732,7 @@ rspamadm_lua_accept_cb (EV_P_ ev_io *w, int revents)
}
/* Check for EAGAIN */
if (nfd == 0) {
+ rspamd_inet_address_free (addr);
return;
}