diff --git a/sys/netinet/in.c b/sys/netinet/in.c index add3d1094938..cee615378531 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -573,7 +573,6 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, } TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); IF_ADDR_WUNLOCK(ifp); -/* ifa_free(&ia->ia_ifa); - Double free?? */ /* if_addrhead */ IN_IFADDR_WLOCK(); TAILQ_REMOVE(&V_in_ifaddrhead, ia, ia_link); @@ -597,6 +596,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, } else ifa_free(&iap->ia_ifa); + ifa_free(&ia->ia_ifa); /* if_addrhead */ ifa_free(&ia->ia_ifa); /* in_ifaddrhead */ out: if (ia != NULL)