Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -884,6 +884,7 @@ 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);
		if (skb)
			irlap_queue_xmit(self, skb);
	}
}