Skip to content

Commit

Permalink
[PPP] pppoe: Fix double-free on skb after transmit failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Sep 20, 2007
1 parent 5588b40 commit 21d0c83
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 21d0c83

Please sign in to comment.