mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
[NET_SCHED]: act_api: fix skb leak in error path
The skb is allocated by the function, so it needs to be freed instead of trimmed on overrun. Coverity #614 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
406dbfc9ae
commit
f6e57464df
1 changed files with 1 additions and 1 deletions
|
@ -707,7 +707,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
|
||||||
|
|
||||||
rtattr_failure:
|
rtattr_failure:
|
||||||
nlmsg_failure:
|
nlmsg_failure:
|
||||||
skb_trim(skb, b - skb->data);
|
kfree_skb(skb);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue