qcacld-3.0: Validate SAP acs freq_list

Add validation of ACS scan frequency list ptr from sap_get_freq_list.
If Null then return failure for sap_channel_sel API.

Change-Id: I46db7a956f8f83ba9eceaa8e9e06fe3b44d1a767
CRs-Fixed: 3219747
This commit is contained in:
Liangwei Dong
2022-06-14 14:03:00 +08:00
committed by Madan Koyyalamudi
parent 40c7084a39
commit 92806a4724

View File

@@ -1312,7 +1312,7 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
} }
sap_get_freq_list(sap_context, &freq_list, &num_of_channels); sap_get_freq_list(sap_context, &freq_list, &num_of_channels);
if (!num_of_channels) { if (!num_of_channels || !freq_list) {
sap_err("No freq sutiable for SAP in current list, SAP failed"); sap_err("No freq sutiable for SAP in current list, SAP failed");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }