]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sched/sch_htb.c
net_sched: reset pointers to tcf blocks in classful qdiscs' destructors
[karo-tx-linux.git] / net / sched / sch_htb.c
index 203286ab442799a07808bd8f73af9f07b0482cbd..5d65ec5207e91202d501a83c983793f2e923f075 100644 (file)
@@ -1258,8 +1258,10 @@ static void htb_destroy(struct Qdisc *sch)
        tcf_block_put(q->block);
 
        for (i = 0; i < q->clhash.hashsize; i++) {
-               hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode)
+               hlist_for_each_entry(cl, &q->clhash.hash[i], 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],