[NET_SCHED]: act_api: fix skb leak in error path
[linux-2.6.git] / net / sched / act_api.c
index 792ce59..2ffa11c 100644 (file)
@@ -707,7 +707,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
 
 rtattr_failure:
 nlmsg_failure:
-       skb_trim(skb, b - skb->data);
+       kfree_skb(skb);
        return -1;
 }