[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1386046268.30495.5.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Mon, 02 Dec 2013 20:51:08 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Yang Yingliang <yangyingliang@...wei.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, brouer@...hat.com,
jpirko@...hat.com, jbrouer@...hat.com
Subject: Re: [PATCH net v4 1/2] net: sched: tbf: fix calculation of max_size
On Tue, 2013-12-03 at 11:26 +0800, Yang Yingliang wrote:
> + if (qopt->rate.linklayer == TC_LINKLAYER_UNAWARE) {
> + rtab = qdisc_get_rtab(&qopt->rate, tb[TCA_TBF_RTAB]);
> + if (rtab) {
> + qdisc_put_rtab(rtab);
> + rtab = NULL;
> + }
> }
Please make remove rtab use to make sure you dont leak a pointer.
if (qopt->rate.linklayer == TC_LINKLAYER_UNAWARE)
qdisc_put_rtab(qdisc_get_rtab(&qopt->rate,
tb[TCA_TBF_RTAB]));
> + if (qopt->peakrate.linklayer == TC_LINKLAYER_UNAWARE) {
> + ptab = qdisc_get_rtab(&qopt->peakrate, tb[TCA_TBF_PTAB]);
> + if (ptab) {
> + qdisc_put_rtab(ptab);
> + ptab = NULL;
> + }
Same here for ptab
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists