diff options
| author | Sreelakshmi Konamki <skonam@codeaurora.org> | 2016-02-10 12:33:40 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-04-17 18:11:58 -0700 |
| commit | 86d79203a7b6bd2280fcad32af32fca07c28b5ba (patch) | |
| tree | 97fbec0a7c8a9e01662f3a2ef989bc13fcadce63 | |
| parent | 20ee4d635eee14b27cd2047e86355c919a7156d2 (diff) | |
qcacld-3.0: Fix Suspicious pointer dereference before NULL check
qcacld-2.0 to qcacld-3.0 propagation
Fix to add NULL check before dereference of pointer
Change-Id: I520aca1fc46cf3fbb30d2f068f6da43a2b2986e6
CRs-Fixed: 965800
| -rw-r--r-- | core/sme/src/oem_data/oem_data_api.c | 4 | ||||
| -rw-r--r-- | core/wma/src/wma_features.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/sme/src/oem_data/oem_data_api.c b/core/sme/src/oem_data/oem_data_api.c index a607caab6d9f..aa0923141036 100644 --- a/core/sme/src/oem_data/oem_data_api.c +++ b/core/sme/src/oem_data/oem_data_api.c @@ -209,8 +209,7 @@ QDF_STATUS oem_data_send_mb_oem_data_req(tpAniSirGlobal pMac, { QDF_STATUS status = QDF_STATUS_SUCCESS; tSirOemDataReq *pMsg; - tCsrRoamSession *pSession = - CSR_GET_SESSION(pMac, pOemDataReq->sessionId); + tCsrRoamSession *pSession; uint16_t msgLen; sms_log(pMac, LOGW, "OEM_DATA: entering Function %s", __func__); @@ -220,6 +219,7 @@ QDF_STATUS oem_data_send_mb_oem_data_req(tpAniSirGlobal pMac, return QDF_STATUS_E_INVAL; } + pSession = CSR_GET_SESSION(pMac, pOemDataReq->sessionId); pMsg = qdf_mem_malloc(sizeof(*pMsg)); if (NULL == pMsg) { sms_log(pMac, LOGP, FL("qdf_mem_malloc failed")); diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 3e500bc59f9d..669854cce0be 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -1506,7 +1506,7 @@ void wma_start_oem_data_req(tp_wma_handle wma_handle, WMA_LOGD(FL("Send OEM Data Request to target")); - if (!startOemDataReq && !startOemDataReq->data) { + if (!startOemDataReq || !startOemDataReq->data) { WMA_LOGE(FL("startOemDataReq is null")); goto out; } |
