diff options
author | sam <sam@FreeBSD.org> | 2009-06-02 18:53:21 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-06-02 18:53:21 +0000 |
commit | ba346476006e8b1ec5b31c5107724957bb0f03c6 (patch) | |
tree | 6a1cd28a0219122cb8099da14d1b15ab48006cb8 /sys/net/if.c | |
parent | 14f4a9dd42b965a4a23b2aef0c7496f931649524 (diff) | |
download | FreeBSD-src-ba346476006e8b1ec5b31c5107724957bb0f03c6.zip FreeBSD-src-ba346476006e8b1ec5b31c5107724957bb0f03c6.tar.gz |
move ifq_detach from if_detach to if_free; this permits callers to
reference if_snd in the period between detach+free which helps simplify
detach code
Reviewed by: jhb, rwatson
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 9a3c1fd..ffff619 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -574,6 +574,7 @@ if_free_internal(struct ifnet *ifp) knlist_destroy(&ifp->if_klist); IF_AFDATA_DESTROY(ifp); IF_ADDR_LOCK_DESTROY(ifp); + ifq_detach(&ifp->if_snd); free(ifp, M_IFNET); } @@ -1025,9 +1026,6 @@ if_detach_internal(struct ifnet *ifp, int vmove) } ifp->if_afdata_initialized = 0; IF_AFDATA_UNLOCK(ifp); - - if (!vmove) - ifq_detach(&ifp->if_snd); } #ifdef VIMAGE |