mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
[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>
This commit is contained in:
parent
31bd06eb33
commit
541673c859
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue