OSDN Git Service

staging: wilc1000: fix unchecked return value
authorPan Bian <bianpan2016@163.com>
Sun, 23 Apr 2017 11:53:58 +0000 (19:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:00:17 +0000 (11:00 +0100)
commit419707a9fbe14ec1877159707ecf4111197c38e8
tree7dc84605f63b767632ad264a713c0469ee8eb24f
parent6806bc0a63ef0797f429b0284f85f1c277d709be
staging: wilc1000: fix unchecked return value

[ Upstream commit 9e96652756ad647b7bcc03cb99ffc9756d7b5f93 ]

Function dev_alloc_skb() will return a NULL pointer if there is no
enough memory. However, in function WILC_WFI_mon_xmit(), its return
value is used without validation. This may result in a bad memory access
bug. This patch fixes the bug.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_mon.c