aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2006-06-05 18:34:33 -0400
committerDavid S. Miller <davem@davemloft.net>2006-06-05 18:34:33 -0400
commit9bc18091a5e44a368827f539289b99788eb27d4e (patch)
tree2fa673fc940f0bdcc04f1d4fbb4bd602f24d947e
parent6569a351da7e58d6f0fbc92fcf0bef5d4a4bc0a4 (diff)
[PPPOE]: Missing result check in __pppoe_xmit().
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>
-rw-r--r--drivers/net/pppoe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 475dc930380f..0d101a18026a 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)
861 * give dev_queue_xmit something it can free. 861 * give dev_queue_xmit something it can free.
862 */ 862 */
863 skb2 = skb_clone(skb, GFP_ATOMIC); 863 skb2 = skb_clone(skb, GFP_ATOMIC);
864
865 if (skb2 == NULL)
866 goto abort;
864 } 867 }
865 868
866 ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); 869 ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr));