qcacld-3.0: Fix potential NULL pointer dereference
Add check to ensure context pointer is not NULL before dereferencing Change-Id: I737ae4d1e5aa07bcbbe612a93905a23fa857b90a CRs-fixed: 2669214
This commit is contained in:
parent
dbb00f0073
commit
92ab495e37
@ -3004,6 +3004,11 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx)
|
||||
return 0;
|
||||
|
||||
mac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
if (!mac) {
|
||||
sap_err("Invalid MAC context");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ucfg_reg_get_curr_band(mac->pdev, &band) != QDF_STATUS_SUCCESS) {
|
||||
sap_err("Failed to get current band config");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user