diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2018-06-26 11:37:10 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-28 21:55:51 +0900 |
commit | 5b9be6713a7ca8bf0a82778c4fdd2cdbf4434767 (patch) | |
tree | 471209611bc9e03cd14f69429f6d2a81a1f2eec2 /drivers/staging | |
parent | e6ea187b5b2acff5ed07dacff37306d0f56d6d43 (diff) |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/wilc1000/host_interface.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 2cc968953ba0..2062f4e6f3f3 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1724,7 +1724,6 @@ out_wpa_rx_gtk: out_wpa_ptk: complete(&msg->work_comp); - kfree(hif_key->attr.wpa.key); break; case PMKSA: @@ -2735,8 +2734,6 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, } wait_for_completion(&msg->work_comp); - kfree(msg); - return 0; free_key: kfree(msg->body.key_info.attr.wpa.key); |