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 committed by Oscar Zhao
parent 517db80f16
commit c45051c7dd

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