From: Herbert Xu Date: Wed, 19 Sep 2007 17:45:02 +0000 (-0700) Subject: [PPP] pppoe: Fix double-free on skb after transmit failure X-Git-Tag: v2.6.23-rc8~19^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21d0c83302fb742b7ffb6089d40196166102f5ed;p=linux-2.6 [PPP] pppoe: Fix double-free on skb after transmit failure 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 0d7f570b9a..9b30cd600a 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -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;