o In case of the error do not forget to deallocate a cloned device unit.

PR:		kern/131642
Submitted by:	Dmitrij Tejblum
MFC after:	1 week
This commit is contained in:
Maxim Konovalov 2009-02-13 12:59:54 +00:00
parent 0134f12f7a
commit 96c8ef3a18

View File

@ -746,6 +746,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
ether_ifdetach(ifp);
vlan_unconfig(ifp);
if_free_type(ifp, IFT_ETHER);
ifc_free_unit(ifc, unit);
free(ifv, M_VLAN);
return (error);