[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1490362789-7293-1-git-send-email-jiri@resnulli.us>
Date: Fri, 24 Mar 2017 14:39:49 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, jhs@...atatu.com, mlxsw@...lanox.com
Subject: [patch net-next] net: sched: atm: destroy main filter chain
From: Jiri Pirko <jiri@...lanox.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@...lanox.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
Powered by blists - more mailing lists