diff options
author | Florin Malita <fmalita@gmail.com> | 2006-06-06 00:34:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-06-06 00:34:52 +0200 |
commit | 8c893ff6abbac0c7c05b1cb9bfb6e2dfc4538c75 (patch) | |
tree | 12b020116e993979fc61d02243a4af5b6ba315f4 /net/irda | |
parent | [PPPOE]: Missing result check in __pppoe_xmit(). (diff) | |
download | linux-8c893ff6abbac0c7c05b1cb9bfb6e2dfc4538c75.tar.xz linux-8c893ff6abbac0c7c05b1cb9bfb6e2dfc4538c75.zip |
[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/irda')
-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); } } |