1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00

Ok jhb, lets move the ifa_free() down to the bottom to

assure that *all* tables and such are removed before
we start to free. This won't protect the Hash in ip_input.c
but in theory should protect any other uses that *do* use locks.

MFC after:	1 week (or more)
This commit is contained in:
Randall Stewart 2012-08-17 05:51:46 +00:00
parent f274a47134
commit 9424879158
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239353

View File

@ -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)