Skip to content

Commit

Permalink
net: add missing freeaddrinfo() to net_resolve_address()
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Jun 22, 2021
1 parent e2a3271 commit b71c9d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/net/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -256,6 +256,7 @@ int net_resolve_address(const char *addr, struct sa *sa)
}

out:
freeaddrinfo(res0);
return err;
}

0 comments on commit b71c9d9

Please sign in to comment.