From 4041c2d64024f27488461e03fcd587dfbb34c4b0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 18 Sep 2021 12:29:57 +0100 Subject: [Minor] Plug some leaks on error paths Found by: coverity scan --- src/controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/controller.c') 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; } -- cgit v1.2.3