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>
}
out_wpa_rx_gtk:
complete(&msg->work_comp);
- kfree(hif_key->attr.wpa.key);
- kfree(hif_key->attr.wpa.seq);
break;
case WPA_PTK:
}
wait_for_completion(&msg->work_comp);
- kfree(msg);
- return 0;
free_key:
kfree(msg->body.key_info.attr.wpa.key);