diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-18 12:29:57 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-18 12:29:57 +0100 |
commit | 4041c2d64024f27488461e03fcd587dfbb34c4b0 (patch) | |
tree | 9af52fdbc4789fc8f35f164a414431ca37710b43 /src/worker.c | |
parent | 1589bd19ff7c841203c548de2c5897e0f0f22c6d (diff) | |
download | rspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.tar.gz rspamd-4041c2d64024f27488461e03fcd587dfbb34c4b0.zip |
[Minor] Plug some leaks on error paths
Found by: coverity scan
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/worker.c b/src/worker.c index 5262f7cde..c2d00d9cd 100644 --- a/src/worker.c +++ b/src/worker.c @@ -342,7 +342,7 @@ accept_socket (EV_P_ ev_io *w, int revents) struct rspamd_worker *worker = (struct rspamd_worker *) w->data; struct rspamd_worker_ctx *ctx; struct rspamd_worker_session *session; - rspamd_inet_addr_t *addr; + rspamd_inet_addr_t *addr = NULL; gint nfd, http_opts = 0; ctx = worker->ctx; @@ -362,6 +362,8 @@ accept_socket (EV_P_ ev_io *w, int revents) } /* Check for EAGAIN */ if (nfd == 0) { + rspamd_inet_address_free (addr); + return; } |