]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PPP] pppoe: Fix double-free on skb after transmit failure
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 19 Sep 2007 17:45:02 +0000 (10:45 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 20 Sep 2007 19:14:16 +0000 (12:14 -0700)
When I got rid of the second packet in __pppoe_xmit I created
a double-free on the skb because of the goto abort on failure.
This patch removes that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pppoe.c

index 0d7f570b9a545eca66557ff3e903617a9f5b54f2..9b30cd600a643af5ba54f6c47c9be9e15f6c8dbe 100644 (file)
@@ -879,8 +879,7 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
        dev->hard_header(skb, dev, ETH_P_PPP_SES,
                         po->pppoe_pa.remote, NULL, data_len);
 
-       if (dev_queue_xmit(skb) < 0)
-               goto abort;
+       dev_queue_xmit(skb);
 
        return 1;