Commit 8c893ff6 authored by Florin Malita's avatar Florin Malita Committed by David S. Miller

[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: 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 9bc18091
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment