diff options
author | Florin Malita <fmalita@gmail.com> | 2006-06-05 15:34:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-06-05 15:34:52 -0700 |
commit | 8c893ff6abbac0c7c05b1cb9bfb6e2dfc4538c75 (patch) | |
tree | 12b020116e993979fc61d02243a4af5b6ba315f4 /net | |
parent | 9bc18091a5e44a368827f539289b99788eb27d4e (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/irda/irlap.c b/net/irda/irlap.c index 7029618f5719..a16528657b4c 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) if (now) { /* Send down empty frame to trigger speed change */ skb = dev_alloc_skb(0); - irlap_queue_xmit(self, skb); + if (skb) + irlap_queue_xmit(self, skb); } } |