From e21c9c6729b8cd440fb97cf30b5db6144260de12 Mon Sep 17 00:00:00 2001 From: Frederik Deweerdt Date: Mon, 15 May 2017 09:14:12 -0700 Subject: Fix leak if setsockopt fails --- net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net.c b/net.c index 024f645..d332db1 100644 --- a/net.c +++ b/net.c @@ -357,6 +357,7 @@ addrretry: n = 1; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char*) &n, sizeof(n)) < 0) { + freeaddrinfo(bservinfo); goto error; } } -- cgit v1.2.3