diff options
author | Patrick McHardy <kaber@trash.net> | 2006-03-12 23:33:22 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-12 23:39:36 -0500 |
commit | f6e57464df7ba0e91a23b0854adb56852dcd58a7 (patch) | |
tree | 9dfee36ee4e5150a3af876b44bca7516554aa5ec /net/sched/act_api.c | |
parent | 406dbfc9ae0e6b7eb4da4a52c0a6556a0d7e6a2f (diff) |
[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>
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r-- | net/sched/act_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 792ce59940ec..2ffa11c6e8de 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -707,7 +707,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | |||
707 | 707 | ||
708 | rtattr_failure: | 708 | rtattr_failure: |
709 | nlmsg_failure: | 709 | nlmsg_failure: |
710 | skb_trim(skb, b - skb->data); | 710 | kfree_skb(skb); |
711 | return -1; | 711 | return -1; |
712 | } | 712 | } |
713 | 713 | ||