]> git.baikalelectronics.ru Git - kernel.git/commit
staging: wilc1000: avoid 'NULL' pointer access in wilc_network_info_received()
authorAjay Singh <ajay.kathat@microchip.com>
Mon, 26 Mar 2018 11:45:56 +0000 (17:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2018 11:37:09 +0000 (13:37 +0200)
commitf8c5e4f4af1bc7d53e1e227d0f83793530d49f5c
tree70f1ea57c7d413dcf3bf7911aa1e3c3c29a10d9c
parent9d24a070951c448a4107342a1a9a19c96c61ba1c
staging: wilc1000: avoid 'NULL' pointer access in wilc_network_info_received()

Added 'NULL' check before accessing the allocated memory. Free up the
memory incase of failure to enqueue the command. Used kmemdup instead of
kmalloc & memcpy.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c