From: Patrick McHardy Date: Mon, 9 Jan 2006 06:17:27 +0000 (-0800) Subject: [PKT_SCHED]: Fix memory leak when dumping in pedit action X-Git-Tag: v2.6.16-rc1~658^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=541673c859c0d71dedaaea1c148dfe3ccccc9422;p=linux-2.6-omap-h63xx.git [PKT_SCHED]: Fix memory leak when dumping in pedit action Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/sched/pedit.c b/net/sched/pedit.c index b5167afec2d..1742a68e012 100644 --- a/net/sched/pedit.c +++ b/net/sched/pedit.c @@ -245,10 +245,12 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse); t.expires = jiffies_to_clock_t(p->tm.expires); RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t); + kfree(opt); return skb->len; rtattr_failure: skb_trim(skb, b - skb->data); + kfree(opt); return -1; }