Re: [PATCH 5/6][PKT_SCHED]: Fix memory leak when dumping in pedit action

2006-01-08 Thread David S. Miller
From: Patrick McHardy [EMAIL PROTECTED]
Date: Sun, 08 Jan 2006 00:37:56 +0100

 [PKT_SCHED]: Fix memory leak when dumping in pedit action
 
 Signed-off-by: Patrick McHardy [EMAIL PROTECTED]

Applied, thanks.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6][PKT_SCHED]: Fix memory leak when dumping in pedit action

2006-01-07 Thread Patrick McHardy
 [PKT_SCHED]: Fix memory leak when dumping in pedit action

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]

---
commit b73952761225e41cb81afe157cb312a594a95693
tree be5312ebbabc4f10c9e08a00b34adaec3c636088
parent 0aec63e67c69545ca757a73a66f5dcf05fa484bf
author Patrick McHardy [EMAIL PROTECTED] Sun, 08 Jan 2006 00:28:58 +0100
committer Patrick McHardy [EMAIL PROTECTED] Sun, 08 Jan 2006 00:28:58 +0100

 net/sched/pedit.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sched/pedit.c b/net/sched/pedit.c
index 767d24f..e469c5a 100644
--- a/net/sched/pedit.c
+++ b/net/sched/pedit.c
@@ -246,10 +246,12 @@ tcf_pedit_dump(struct sk_buff *skb, stru
 	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;
 }