From 0ab2c922340b8848c79301fdd84548417c0c3023 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 24 Mar 2023 06:25:28 +0100 Subject: [PATCH] ifconfig: free memory allocated by getaddrinfo() Reported by: emaste, Coverity Sponsored by: Rubicon Communications, LLC (Netgate) --- sbin/ifconfig/carp.c | 1 + 1 file changed, 1 insertion(+) 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