qcacld-3.0: Avoid calling qdf_mem_malloc for zero unsafe channels
Currently in hdd_init_channel_avoidance api we are proceeding for malloc without checking unsafe channel count. To address this issue add check before calling qdf_mem_malloc api to check if unsafe channel count is greater than 0, otherwise return from the function. Change-Id: I4d54a6aa97a141be06695d2455fb5d6aff8db082 CRs-Fixed: 3273502
This commit is contained in:

zatwierdzone przez
Madan Koyyalamudi

rodzic
3e53da2acd
commit
485829ae22
@@ -11533,6 +11533,9 @@ static void hdd_init_channel_avoidance(struct hdd_context *hdd_ctx)
|
||||
unsafe_channel_count = QDF_MIN((uint16_t)hdd_ctx->unsafe_channel_count,
|
||||
(uint16_t)NUM_CHANNELS);
|
||||
|
||||
if (!unsafe_channel_count)
|
||||
return;
|
||||
|
||||
unsafe_freq_list = qdf_mem_malloc(
|
||||
unsafe_channel_count * sizeof(*unsafe_freq_list));
|
||||
|
||||
|
Reference in New Issue
Block a user