qcacld-3.0: Prevent Null pointer access during tdls exit

qcacld-2.0 to qcacld-3.0 propagation

Prevent Null pointer access during tdls exit.

Change-Id: I76f5896ae4c51d4816cc0389151e1e27b07d2193
CRs-Fixed: 1017282
(cherry picked from commit bfed788cb89d39092c755cb35b6a6aa4b8772503)
This commit is contained in:
Mukul Sharma
2016-09-03 13:40:46 +05:30
committed by qcabuildsw
parent dd93cbca9e
commit eae172c061

View File

@@ -10165,12 +10165,15 @@ QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams,
tpAniSirGlobal pMac = NULL;
cds_msg_t cds_message;
pMac = PMAC_STRUCT(hHal);
if (NULL == pMac) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
FL("pMac is Null"));
return QDF_STATUS_E_FAILURE;
}
/* only acquire sme global lock before state update if asked to */
if (useSmeLock) {
pMac = PMAC_STRUCT(hHal);
if (NULL == pMac)
return QDF_STATUS_E_FAILURE;
status = sme_acquire_global_lock(&pMac->sme);
if (QDF_STATUS_SUCCESS != status)
return status;