aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2006-06-05 18:34:52 -0400
committerDavid S. Miller <davem@davemloft.net>2006-06-05 18:34:52 -0400
commit8c893ff6abbac0c7c05b1cb9bfb6e2dfc4538c75 (patch)
tree12b020116e993979fc61d02243a4af5b6ba315f4 /net
parent9bc18091a5e44a368827f539289b99788eb27d4e (diff)
[IRDA]: Missing allocation result check in irlap_change_speed().
The skb allocation may fail, which can result in a NULL pointer dereference in irlap_queue_xmit(). Coverity CID: 434. 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>
Diffstat (limited to 'net')
-rw-r--r--net/irda/irlap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index 7029618f571..a16528657b4 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -884,7 +884,8 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
884 if (now) { 884 if (now) {
885 /* Send down empty frame to trigger speed change */ 885 /* Send down empty frame to trigger speed change */
886 skb = dev_alloc_skb(0); 886 skb = dev_alloc_skb(0);
887 irlap_queue_xmit(self, skb); 887 if (skb)
888 irlap_queue_xmit(self, skb);
888 } 889 }
889} 890}
890 891