diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index b4fa8d496ec4..5804e931517a 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -511,9 +511,10 @@ kue_detach(device_t dev) sc->kue_dying = 1; - if (ifp != NULL) + if (ifp != NULL) { ether_ifdetach(ifp); if_free(ifp); + } if (sc->kue_ep[KUE_ENDPT_TX] != NULL) usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]);