Thread (3 messages) flat view 3 messages, 2 authors, 2017-03-24
STALE3426d

[patch net-next] net: sched: atm: destroy main filter chain

From: Jiri Pirko <jiri@resnulli.us>
Date: 2017-03-24 13:40:14
Subsystem: networking [general], tc subsystem, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jamal Hadi Salim, Jiri Pirko, Linus Torvalds

From: Jiri Pirko <redacted>

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 <redacted>
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help