diff options
author | Patrick McHardy <kaber@trash.net> | 2006-01-09 01:17:27 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-09 17:16:12 -0500 |
commit | 541673c859c0d71dedaaea1c148dfe3ccccc9422 (patch) | |
tree | 17a3438e0f77033a7c3911cee91b1d3fff6c91d9 | |
parent | 31bd06eb33bbabe643385a861d780d950ca73846 (diff) |
[PKT_SCHED]: Fix memory leak when dumping in pedit action
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | 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 b5167afec2dc..1742a68e0122 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) | |||
245 | t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse); | 245 | t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse); |
246 | t.expires = jiffies_to_clock_t(p->tm.expires); | 246 | t.expires = jiffies_to_clock_t(p->tm.expires); |
247 | RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t); | 247 | RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t); |
248 | kfree(opt); | ||
248 | return skb->len; | 249 | return skb->len; |
249 | 250 | ||
250 | rtattr_failure: | 251 | rtattr_failure: |
251 | skb_trim(skb, b - skb->data); | 252 | skb_trim(skb, b - skb->data); |
253 | kfree(opt); | ||
252 | return -1; | 254 | return -1; |
253 | } | 255 | } |
254 | 256 | ||