Re: [PATCH 2/2] tc: policing requires a rate estimator
From: Patrick McHardy <hidden>
Date: 2008-11-25 18:39:04
From: Patrick McHardy <hidden>
Date: 2008-11-25 18:39:04
Stephen Hemminger wrote:
On Tue, 25 Nov 2008 19:32:13 +0100 Patrick McHardy [off-list ref] wrote:quoted
quoted
--- a/net/sched/act_police.c 2008-11-25 10:15:50.000000000 -0800 +++ b/net/sched/act_police.c 2008-11-25 10:17:54.000000000 -0800@@ -182,6 +182,12 @@ override: R_tab = qdisc_get_rtab(&parm->rate, tb[TCA_POLICE_RATE]); if (R_tab == NULL) goto failure; + + if (!est && !gen_estimator_active(&police->tcf_rate_est)) { + err = -EINVAL; + goto failure;This leaks the R_tab reference.The previous patch added a put at the failure: tag.
I missed that, sorry.