From b71c9d9d0e7433d2134ec95d66313420eacb5bcd Mon Sep 17 00:00:00 2001 From: Christian Spielberger Date: Tue, 22 Jun 2021 19:59:43 +0200 Subject: [PATCH] net: add missing freeaddrinfo() to net_resolve_address() --- src/net/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/net/net.c b/src/net/net.c index 9a373f066..f36422e61 100644 --- a/src/net/net.c +++ b/src/net/net.c @@ -233,7 +233,7 @@ int net_default_gateway_get(int af, struct sa *gw) */ int net_resolve_address(const char *addr, struct sa *sa) { - struct addrinfo *res, *res0; + struct addrinfo *res, *res0 = NULL; struct addrinfo hints; int err; @@ -256,6 +256,7 @@ int net_resolve_address(const char *addr, struct sa *sa) } out: + freeaddrinfo(res0); return err; }