diff options
Diffstat (limited to 'sys/pci/if_tl.c')
-rw-r--r-- | sys/pci/if_tl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index e670043..6743912 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1307,7 +1307,6 @@ tl_attach(dev) if (error) { device_printf(dev, "couldn't set up irq\n"); ether_ifdetach(ifp); - if_free(ifp); goto fail; } @@ -1343,8 +1342,9 @@ tl_detach(dev) TL_UNLOCK(sc); callout_drain(&sc->tl_stat_callout); ether_ifdetach(ifp); - if_free(ifp); } + if (ifp) + if_free(ifp); if (sc->tl_miibus) device_delete_child(dev, sc->tl_miibus); bus_generic_detach(dev); |