diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2018-06-26 11:37:11 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-28 21:55:51 +0900 |
commit | 56b408e513baeaff715acadbe98472f94e4cdbf3 (patch) | |
tree | ad38852897b626e037e23a0b325e1ae810ddd106 /drivers/staging | |
parent | 5b9be6713a7ca8bf0a82778c4fdd2cdbf4434767 (diff) |
staging: wilc1000: handle freeing of 'key' & 'seq' data in wilc_add_rx_gtk()
Handle freeing of memory allocated to keep 'key' & 'seq' in wilc_add_rx_gtk().
Once completion event is received, free the memory allocated for
to avoid missing of free in work function.
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 | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 2062f4e6f3f3..2251c39f659a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1667,8 +1667,6 @@ out_wep: } out_wpa_rx_gtk: complete(&msg->work_comp); - kfree(hif_key->attr.wpa.key); - kfree(hif_key->attr.wpa.seq); break; case WPA_PTK: @@ -2812,8 +2810,6 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len, } wait_for_completion(&msg->work_comp); - kfree(msg); - return 0; free_key: kfree(msg->body.key_info.attr.wpa.key); |