diff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c index 0dc3facdaf79..126a15a230df 100644 --- a/sbin/ifconfig/carp.c +++ b/sbin/ifconfig/carp.c @@ -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