Skip to content

Commit

Permalink
[PPPOE]: Missing result check in __pppoe_xmit().
Browse files Browse the repository at this point in the history
skb_clone() may fail, we should check the result.

Coverity CID: 1215.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florin Malita authored and David S. Miller committed Jun 5, 2006
1 parent 6569a35 commit 9bc1809
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
* give dev_queue_xmit something it can free.
*/
skb2 = skb_clone(skb, GFP_ATOMIC);

if (skb2 == NULL)
goto abort;
}

ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr));
Expand Down

0 comments on commit 9bc1809

Please sign in to comment.