* [PATCH] pppoe: missing result check in __pppoe_xmit()
@ 2006-05-31 4:12 Florin Malita
0 siblings, 0 replies; only message in thread
From: Florin Malita @ 2006-05-31 4:12 UTC (permalink / raw)
To: mostrows; +Cc: linux-kernel, akpm
skb_clone() may fail, we should check the result.
Coverity CID: 1215.
Signed-off-by: Florin Malita <fmalita@gmail.com>
---
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 475dc93..0d101a1 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -861,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk,
* 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));
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-31 4:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-31 4:12 [PATCH] pppoe: missing result check in __pppoe_xmit() Florin Malita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).