qcacld-3.0: Add NULL check for pm_ctx pointer

Add NULL check for pm_ctx pointer to avoid NULL pointer deference
in function policy_mgr_pcl_modification_for_sap().

Change-Id: Ibc32e5dace8eddd1b88775af6ce76ae62fc76a1e
CRs-Fixed: 3626754
Esse commit está contido em:
Huashan Qu
2023-10-17 18:40:02 +08:00
commit de Ravindra Konda
commit 98cfb3eac3

Ver arquivo

@@ -1339,6 +1339,10 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap(
bool srd_chan_enabled;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid context");
return QDF_STATUS_E_FAILURE;
}
/* check the channel avoidance list for beaconing entities */
policy_mgr_update_with_safe_channel_list(psoc, pcl_channels,