getlistenfd: fix minor memleak - geomyidae - A small C-based gopherd. HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit feed37adc1b23cac513b5d2a17bda4e2ffc77c81 DIR parent 7474d9bd62ae23a8bd355aaf83be9fe9a9693d4d HTML 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: M main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- DIR 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; }