projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bc1809
)
[IRDA]: Missing allocation result check in irlap_change_speed().
author
Florin Malita
<fmalita@gmail.com>
Mon, 5 Jun 2006 22:34:52 +0000
(15:34 -0700)
committer
David S. Miller
<davem@davemloft.net>
Mon, 5 Jun 2006 22:34:52 +0000
(15:34 -0700)
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>
net/irda/irlap.c
patch
|
blob
|
blame
|
history
diff --git
a/net/irda/irlap.c
b/net/irda/irlap.c
index 7029618f5719fa6659bd096c7d7a0345b29dff70..a16528657b4c6a0a7e584df36e051cdcff6706ec 100644
(file)
--- 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);
}
}