netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next] net: sched: atm: destroy main filter chain
@ 2017-03-24 13:39 Jiri Pirko
  2017-03-24 17:46 ` Cong Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2017-03-24 13:39 UTC (permalink / raw)
  To: netdev; +Cc: davem, jhs, mlxsw

From: Jiri Pirko <jiri@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 <jiri@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-24 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-24 13:39 [patch net-next] net: sched: atm: destroy main filter chain Jiri Pirko
2017-03-24 17:46 ` Cong Wang
2017-03-24 17:55   ` Jiri Pirko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).