diff options
-rw-r--r-- | sys/dev/vx/if_vx_eisa.c | 3 | ||||
-rw-r--r-- | sys/dev/vx/if_vx_pci.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/vx/if_vx_eisa.c b/sys/dev/vx/if_vx_eisa.c index ec67e26..459e348 100644 --- a/sys/dev/vx/if_vx_eisa.c +++ b/sys/dev/vx/if_vx_eisa.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include <machine/resource.h> #include <sys/rman.h> +#include <net/ethernet.h> #include <net/if.h> #include <net/if_arp.h> @@ -159,6 +160,8 @@ vx_eisa_attach(device_t dev) bad_mtx: mtx_destroy(&sc->vx_mtx); + ether_ifdetach(sc->vx_ifp); + if_free(sc->vx_ifp); bad: if (io) bus_release_resource(dev, SYS_RES_IOPORT, 0, io); diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c index 2e358d5..dc0fea7 100644 --- a/sys/dev/vx/if_vx_pci.c +++ b/sys/dev/vx/if_vx_pci.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include <sys/module.h> #include <sys/socket.h> +#include <net/ethernet.h> #include <net/if.h> #include <net/if_arp.h> @@ -167,6 +168,8 @@ vx_pci_attach(device_t dev) bad_mtx: mtx_destroy(&sc->vx_mtx); + ether_ifdetach(sc->vx_ifp); + if_free(sc->vx_ifp); bad: if (sc->vx_intrhand != NULL) bus_teardown_intr(dev, sc->vx_irq, sc->vx_intrhand); |