summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2012-08-17 05:51:46 +0000
committerrrs <rrs@FreeBSD.org>2012-08-17 05:51:46 +0000
commit1bcd97d2397cc3de594cfeed003322c713a220d0 (patch)
tree92225a4c77a91cb1d9b8a304da113aa43e6d7e1e /sys/netinet
parent1c4df46d33f6f47eb491ad2b04f5a49b017d406b (diff)
downloadFreeBSD-src-1bcd97d2397cc3de594cfeed003322c713a220d0.zip
FreeBSD-src-1bcd97d2397cc3de594cfeed003322c713a220d0.tar.gz
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)
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index add3d10..cee6153 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)
OpenPOWER on IntegriCloud