diff options
| author | Mukul Sharma <mukul@codeaurora.org> | 2016-09-03 13:40:46 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-09-10 19:05:56 -0700 |
| commit | eae172c061df2da3c695a3ad61518fce3cd6569a (patch) | |
| tree | 6902f5280afdb4affd87f96e70503da6d5b6c923 | |
| parent | dd93cbca9eac0aa27ba043036f46f8a3c016c58b (diff) | |
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)
| -rw-r--r-- | core/sme/src/common/sme_api.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 97307b07e901..72b64cc54057 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -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; |
