diff options
-rw-r--r-- | sys/net/if_vlan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index dbed1bd..00ed046 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -379,9 +379,10 @@ trunk_destroy(struct ifvlantrunk *trunk) #ifndef VLAN_ARRAY vlan_freehash(trunk); #endif - TRUNK_LOCK_DESTROY(trunk); - LIST_REMOVE(trunk, trunk_entry); trunk->parent->if_vlantrunk = NULL; + LIST_REMOVE(trunk, trunk_entry); + TRUNK_UNLOCK(trunk); + TRUNK_LOCK_DESTROY(trunk); free(trunk, M_VLAN); } |