ifconfig: free memory allocated by getaddrinfo()

Reported by:	emaste, Coverity
Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Kristof Provost 2023-03-24 06:25:28 +01:00
parent 949d971f0b
commit 0ab2c92234

View File

@ -242,6 +242,7 @@ setcarp_peer6(const char *val, int d, int s, const struct afswtch *afp)
memcpy(&carp_addr6, &((struct sockaddr_in6 *)res->ai_addr)->sin6_addr,
sizeof(carp_addr6));
freeaddrinfo(res);
}
static void