From: Florin Malita Date: Mon, 5 Jun 2006 22:34:33 +0000 (-0700) Subject: [PPPOE]: Missing result check in __pppoe_xmit(). X-Git-Tag: v2.6.17-rc6~1^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bc18091a5e44a368827f539289b99788eb27d4e;p=linux-2.6 [PPPOE]: Missing result check in __pppoe_xmit(). skb_clone() may fail, we should check the result. Coverity CID: 1215. Signed-off-by: Florin Malita Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 475dc93038..0d101a1802 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -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));