From a6347cd7d26810238e7ce5c325fb5735f9178cfc Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 4 Jan 2023 11:38:28 +0000 Subject: [PATCH] Fix Coverity Scan 1501449. --- src/net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net.c b/src/net.c index b9a27685..e07da8b3 100644 --- a/src/net.c +++ b/src/net.c @@ -770,6 +770,7 @@ static int net__socket_listen_tcp(struct mosquitto__listener *listener) COMPAT_CLOSE(sock); listener->sock_count--; if(rc == MOSQ_ERR_NOT_FOUND || rc == MOSQ_ERR_INVAL){ + freeaddrinfo(ainfo); return rc; }else{ continue;