summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/net/if_tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/net/if_tap.c')
-rw-r--r--freebsd/sys/net/if_tap.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/freebsd/sys/net/if_tap.c b/freebsd/sys/net/if_tap.c
index 9c501f16..599905e8 100644
--- a/freebsd/sys/net/if_tap.c
+++ b/freebsd/sys/net/if_tap.c
@@ -215,14 +215,10 @@ tap_destroy(struct tap_softc *tp)
{
struct ifnet *ifp = tp->tap_ifp;
- /* Unlocked read. */
- KASSERT(!(tp->tap_flags & TAP_OPEN),
- ("%s flags is out of sync", ifp->if_xname));
-
CURVNET_SET(ifp->if_vnet);
+ destroy_dev(tp->tap_dev);
seldrain(&tp->tap_rsel);
knlist_destroy(&tp->tap_rsel.si_note);
- destroy_dev(tp->tap_dev);
ether_ifdetach(ifp);
if_free_type(ifp, IFT_ETHER);