qcacld-3.0: Add check about num radio
When process hdd_process_ll_stats, the results->num_radio may be 0 and it causes issue like "Cannot malloc 0 bytes @ hdd_process_ll_stats:1475" To resolve this issue, add checking before malloc memory. Change-Id: I48d4a4045ebdad7465a97417e6514849cf12ef15 CRs-Fixed: 3374212
This commit is contained in:

committed by
Madan Koyyalamudi

parent
d3ede92170
commit
0a8f4239ab
@@ -1466,6 +1466,10 @@ static void hdd_process_ll_stats(tSirLLStatsResults *results,
|
||||
struct wifi_radio_stats *rs_results, *stat_result;
|
||||
u64 channel_size = 0, pwr_lvl_size = 0;
|
||||
int i;
|
||||
|
||||
if (!results->num_radio)
|
||||
goto exit;
|
||||
|
||||
stats = qdf_mem_malloc(sizeof(*stats));
|
||||
if (!stats)
|
||||
goto exit;
|
||||
|
Reference in New Issue
Block a user