diff options
author | bz <bz@FreeBSD.org> | 2008-11-26 12:54:31 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-11-26 12:54:31 +0000 |
commit | 2df0dfae2558afc5978e0b98cba4bc00c3847707 (patch) | |
tree | 8d979fd83d326e23054c50b3b120df7b769c61d1 /sys/netinet6/in6_pcb.c | |
parent | 3c7e39c29303a42d68c3df83f50a34f321999690 (diff) | |
download | FreeBSD-src-2df0dfae2558afc5978e0b98cba4bc00c3847707.zip FreeBSD-src-2df0dfae2558afc5978e0b98cba4bc00c3847707.tar.gz |
Unify the v4 and v6 versions of pcbdetach and pcbfree as good
as possible so that they are easily diffable.
No functional changes.
Reviewed by: rwatson
MFC after: 6 weeks
Diffstat (limited to 'sys/netinet6/in6_pcb.c')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index b816fea..d16852e 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -414,7 +414,8 @@ void in6_pcbdetach(struct inpcb *inp) { - KASSERT(inp->inp_socket != NULL, ("in6_pcbdetach: inp_socket == NULL")); + KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); + inp->inp_socket->so_pcb = NULL; inp->inp_socket = NULL; } @@ -424,8 +425,9 @@ in6_pcbfree(struct inpcb *inp) { struct inpcbinfo *ipi = inp->inp_pcbinfo; - KASSERT(inp->inp_socket == NULL, ("in6_pcbfree: inp_socket != NULL")); - INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + + INP_INFO_WLOCK_ASSERT(ipi); INP_WLOCK_ASSERT(inp); #ifdef IPSEC @@ -443,6 +445,7 @@ in6_pcbfree(struct inpcb *inp) inp_freemoptions(inp->inp_moptions); inp->inp_vflag = 0; crfree(inp->inp_cred); + #ifdef MAC mac_inpcb_destroy(inp); #endif |