forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
9bc18091a5
commit
8c893ff6ab
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user