aboutsummaryrefslogtreecommitdiffstats
path: root/src/controller.c
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/controller.c
parent1589bd19ff7c841203c548de2c5897e0f0f22c6d (diff)
downloadrspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.tar.gz
rspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.zip
[Minor] Plug some leaks on error paths
Found by: coverity scan
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/controller.c b/src/controller.c
index 0f9a762e1..a34bb6034 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -3563,7 +3563,7 @@ rspamd_controller_accept_socket (EV_P_ ev_io *w, int revents)
struct rspamd_worker *worker = (struct rspamd_worker *)w->data;
struct rspamd_controller_worker_ctx *ctx;
struct rspamd_controller_session *session;
- rspamd_inet_addr_t *addr;
+ rspamd_inet_addr_t *addr = NULL;
gint nfd;
ctx = worker->ctx;
@@ -3576,6 +3576,7 @@ rspamd_controller_accept_socket (EV_P_ ev_io *w, int revents)
}
/* Check for EAGAIN */
if (nfd == 0) {
+ rspamd_inet_address_free (addr);
return;
}