+4
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When fixed_param->num_radio is 0 from FW, host allocates struct tSirLLStatsResults with 0 count of struct wifi_radio_stats to wma_handle->link_stats_results. When the second radio stats comes, the driver will not allocate wma_handle->link_stats_results because wma_handle->link_stats_results is not NULL. Later driver will access the wma_handle->link_stats_results based on radio_stats->radio_id. This will access invalid memory because the original wma_handle->link_stats_results memory didn't include the wifi_radio_stats. Fix by free the link_stats_results if wma_handle->link_stats_results->num_radio is 0, then driver will allocate wma_handle->link_stats_results memory including the struct wifi_radio_stats based on num_radio. Change-Id: Ie1d6bbe8c668d2fb475fddb60907fd13a7f8de66 CRs-Fixed: 3082779