mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Fix null pointer dereference in wma_roam_scan_offload_mode
In wma_roam_scan_offload_mode function validate mem_alloc return pointer to avoid NULL pointer dereference. Change-Id: Ib2733346614ddb99ac329aa929a774db2c4325d6 CRs-Fixed: 1082162 (cherry picked from commit 97961da746e461c6f4f8ab3d77b269db77e5d2fa)
This commit is contained in:
parent
31576d985a
commit
cf6b960cb0
1 changed files with 7 additions and 4 deletions
|
|
@ -755,14 +755,17 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
|
|||
struct roam_offload_scan_params *params =
|
||||
qdf_mem_malloc(sizeof(*params));
|
||||
|
||||
if (!params) {
|
||||
WMA_LOGE("%s: Failed to allocate scan params", __func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
int auth_mode = WMI_AUTH_NONE;
|
||||
params->auth_mode = WMI_AUTH_NONE;
|
||||
if (roam_req)
|
||||
auth_mode = e_csr_auth_type_to_rsn_authmode
|
||||
params->auth_mode = e_csr_auth_type_to_rsn_authmode
|
||||
(roam_req->ConnectedNetwork.authentication,
|
||||
roam_req->ConnectedNetwork.encryption);
|
||||
WMA_LOGD("%s : auth mode = %d", __func__, auth_mode);
|
||||
params->auth_mode = auth_mode;
|
||||
WMA_LOGD("%s : auth mode = %d", __func__, params->auth_mode);
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
params->is_roam_req_valid = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue