]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PPPOE]: Missing result check in __pppoe_xmit().
authorFlorin Malita <fmalita@gmail.com>
Mon, 5 Jun 2006 22:34:33 +0000 (15:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jun 2006 22:34:33 +0000 (15:34 -0700)
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>
drivers/net/pppoe.c

index 475dc930380f63b6a1b0fd52b2532b43354798c5..0d101a18026a31b250a010bba4be28be45cab441 100644 (file)
@@ -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));