From f3447eb493aa63da35292a42b515a2638d08aef9 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Mon, 15 Aug 2005 20:27:34 +0000 Subject: [PATCH] Vlan interfaces change their type after ether_ifattach() so we needs to use if_free_type(ifp, IFT_ETHER) to delete them and stop leaking struct arpcoms. Reported by: thompsa MFC After: 3 days --- sys/net/if_vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 7be7a78dc7b1..87b3a6ca27fb 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -437,7 +437,7 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) VLAN_UNLOCK(); ether_ifdetach(ifp); - if_free(ifp); + if_free_type(ifp, IFT_ETHER); free(ifv, M_VLAN);