Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bc18091 authored by Florin Malita's avatar Florin Malita Committed by David S. Miller
Browse files

[PPPOE]: Missing result check in __pppoe_xmit().



skb_clone() may fail, we should check the result.

Coverity CID: 1215.

Signed-off-by: default avatarFlorin Malita <fmalita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6569a351
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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));