From: pelikan Date: Wed, 1 Jan 2014 17:46:43 +0000 (+0000) Subject: Destroy the eligible list when detaching from an interface. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9c305af04ffddccf159d3759de338f7cb7e51aa7;p=openbsd Destroy the eligible list when detaching from an interface. ok henning --- diff --git a/sys/net/hfsc.c b/sys/net/hfsc.c index a297ea35bd4..b838484ac28 100644 --- a/sys/net/hfsc.c +++ b/sys/net/hfsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hfsc.c,v 1.4 2013/11/01 23:00:02 pelikan Exp $ */ +/* $OpenBSD: hfsc.c,v 1.5 2014/01/01 17:46:43 pelikan Exp $ */ /* * Copyright (c) 2012-2013 Henning Brauer @@ -151,10 +151,14 @@ hfsc_attach(struct ifnet *ifp) int hfsc_detach(struct ifnet *ifp) { - timeout_del(&ifp->if_snd.ifq_hfsc->hif_defer); - free(ifp->if_snd.ifq_hfsc, M_DEVBUF); + struct hfsc_if *hif = ifp->if_snd.ifq_hfsc; + + timeout_del(&hif->hif_defer); ifp->if_snd.ifq_hfsc = NULL; + hfsc_ellist_destroy(hif->hif_eligible); + free(hif, M_DEVBUF); + return (0); }