staging: wilc1000: use kmemdup instead of kmalloc in add_network_to_shadow()
authorAjay Singh <ajay.kathat@microchip.com>
Fri, 11 May 2018 08:13:15 +0000 (13:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 12:04:48 +0000 (14:04 +0200)
commit7ca6ba24c3e3ca852d46acf885c4982fab3bb895
treeb98cfe6f2ccde0df0682c97220e8fdeecbf2598b
parent30300a1cbd4ce2df28abc62b087ef18bb379ec7f
staging: wilc1000: use kmemdup instead of kmalloc in add_network_to_shadow()

Use kmemdup instead of kmalloc & memcpy in add_network_to_shadow(). Also
added  code to set 'ies_len' to zero in case of memory allocation
failure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c