]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sched/sch_hfsc.c
net_sched: reset pointers to tcf blocks in classful qdiscs' destructors
[karo-tx-linux.git] / net / sched / sch_hfsc.c
index 3ad02bbe6903ac3400f088beeb7850de498c06d7..fd15200f86273add7d6c8c4a18aaef912aba7411 100644 (file)
@@ -1530,8 +1530,10 @@ hfsc_destroy_qdisc(struct Qdisc *sch)
        unsigned int i;
 
        for (i = 0; i < q->clhash.hashsize; i++) {
-               hlist_for_each_entry(cl, &q->clhash.hash[i], cl_common.hnode)
+               hlist_for_each_entry(cl, &q->clhash.hash[i], cl_common.hnode) {
                        tcf_block_put(cl->block);
+                       cl->block = NULL;
+               }
        }
        for (i = 0; i < q->clhash.hashsize; i++) {
                hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i],