Make netif_free() safe to call on a partially initialized softc.
Sponsored by: Spectra Logic Corporation MFC after: 1 week
This commit is contained in:
parent
5e58295a1f
commit
e3242f9d08
@ -2177,8 +2177,11 @@ netif_free(struct netfront_info *info)
|
||||
callout_drain(&info->xn_stat_ch);
|
||||
netif_disconnect_backend(info);
|
||||
ifmedia_removeall(&info->sc_media);
|
||||
ether_ifdetach(info->xn_ifp);
|
||||
if_free(info->xn_ifp);
|
||||
if (info->xn_ifp != NULL) {
|
||||
ether_ifdetach(info->xn_ifp);
|
||||
if_free(info->xn_ifp);
|
||||
info->xn_ifp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user