From: Florin Malita The skb allocation may fail, which can result in a NULL pointer dereference in irlap_queue_xmit(). Coverity CID: 434. davem: "If the allocation fails we should probably do something more interesting here, such as schedule a timer to try again later. Otherwise the speed change will silently never occur." Signed-off-by: Florin Malita Cc: Samuel Ortiz Signed-off-by: Andrew Morton --- net/irda/irlap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN net/irda/irlap.c~irda-missing-allocation-result-check-in-irlap_change_speed net/irda/irlap.c --- devel/net/irda/irlap.c~irda-missing-allocation-result-check-in-irlap_change_speed 2006-06-01 20:31:50.000000000 -0700 +++ devel-akpm/net/irda/irlap.c 2006-06-01 20:31:50.000000000 -0700 @@ -884,7 +884,8 @@ static void irlap_change_speed(struct ir 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); } } _