aboutsummaryrefslogtreecommitdiffstats
path: root/test
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 /test
parent1589bd19ff7c841203c548de2c5897e0f0f22c6d (diff)
downloadrspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.tar.gz
rspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.zip
[Minor] Plug some leaks on error paths
Found by: coverity scan
Diffstat (limited to 'test')
-rw-r--r--test/rspamd_http_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/rspamd_http_test.c b/test/rspamd_http_test.c
index c783ccf21..1b271a7cc 100644
--- a/test/rspamd_http_test.c
+++ b/test/rspamd_http_test.c
@@ -53,7 +53,7 @@ static void
rspamd_server_accept (gint fd, short what, void *arg)
{
struct rspamd_http_connection_router *rt = arg;
- rspamd_inet_addr_t *addr;
+ rspamd_inet_addr_t *addr = NULL;
gint nfd;
if ((nfd =
@@ -63,6 +63,7 @@ rspamd_server_accept (gint fd, short what, void *arg)
}
/* Check for EAGAIN */
if (nfd == 0) {
+ rspamd_inet_address_free (addr);
return;
}