staging: wilc1000: handle freeing of key data in wilc_add_ptk()
authorAjay Singh <ajay.kathat@microchip.com>
Tue, 26 Jun 2018 06:07:10 +0000 (11:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 12:55:51 +0000 (21:55 +0900)
commit5b9be6713a7ca8bf0a82778c4fdd2cdbf4434767
tree471209611bc9e03cd14f69429f6d2a81a1f2eec2
parente6ea187b5b2acff5ed07dacff37306d0f56d6d43
staging: wilc1000: handle freeing of key data in wilc_add_ptk()

Handle freeing of memory allocated to store the 'key' in wilc_add_ptk()
function. Once work completion notification is received, free the
memory allocated to avoid missing of free in work function sepecially
for error scenario.

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