From: Jiri Pirko <j...@mellanox.com> In atm_tc_destroy, the flow qdisc filter chains are destroyed. However the main chain is not. So fix this memory and reference leak.
Signed-off-by: Jiri Pirko <j...@mellanox.com> --- Sending this for net-next because this is present at least from the beginning of git epoch. Feel free to apply on -net, however I don't have "Fixes: " :) --- net/sched/sch_atm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 2209c2d..56421da 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -560,6 +560,9 @@ static void atm_tc_destroy(struct Qdisc *sch) struct atm_flow_data *flow, *tmp; pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p); + + tcf_destroy_chain(&p->link.filter_list); + list_for_each_entry(flow, &p->flows, list) tcf_destroy_chain(&flow->filter_list); -- 2.7.4