Actually free the unit when destroying the interface.

Reported by:	la at delfi.lt
Tested by:	la at delfi.lt
PR:		68618
This commit is contained in:
brooks 2004-07-22 22:50:15 +00:00
parent 05d909929a
commit 06e35179cc

View File

@ -421,8 +421,11 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len)
static int
vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
{
int unit;
struct ifvlan *ifv = ifp->if_softc;
unit = ifp->if_dunit;
VLAN_LOCK();
LIST_REMOVE(ifv, ifv_list);
vlan_unconfig(ifp);
@ -432,6 +435,8 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
free(ifv, M_VLAN);
ifc_free_unit(ifc, unit);
return (0);
}