commit feed37adc1b23cac513b5d2a17bda4e2ffc77c81
parent 7474d9bd62ae23a8bd355aaf83be9fe9a9693d4d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 29 Aug 2018 20:17:34 +0200
getlistenfd: fix minor memleak
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.c b/main.c
@@ -331,9 +331,9 @@ getlistenfd(struct addrinfo *hints, char *bindip, char *port)
logentry(addstr, port, "-", "could not bind");
}
}
+ freeaddrinfo(ai);
if (rp == NULL)
return -1;
- freeaddrinfo(ai);
return listfd;
}