diff options
| author | zhangq <zhangq@qti.qualcomm.com> | 2016-04-12 13:26:46 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-05-05 19:46:01 +0530 |
| commit | 7956d87d78f05cd82c9bc93932c50213b07cd981 (patch) | |
| tree | 3beb17197f15c10febb6ec2162ca5802bed2c985 | |
| parent | 37184b3143b6f2b8f1aeb93add7970a47580d997 (diff) | |
qcacld-2.0: Resolve error dereference in smeApi.c
In sme_set_pdev_ht_vht_ies(), ht_vht_cfg will be freed in
palSendMBMessage.
In sme_set_miracast(), there is dereference before null
check.
Change-Id: Id67a13c6fb2acaf2444212faf0453891558be202
CRs-Fixed: 1002063
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 23b3a4ad21f0..559622b0b43d 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -12921,7 +12921,6 @@ void sme_set_pdev_ht_vht_ies(tHalHandle hal, bool enable2x2) if (eHAL_STATUS_SUCCESS != status) { smsLog(mac_ctx, LOGE, FL( "SME_PDEV_SET_HT_VHT_IE msg to PE failed")); - vos_mem_free(ht_vht_cfg); } sme_ReleaseGlobalLock(&mac_ctx->sme); } @@ -14697,8 +14696,13 @@ eHalStatus sme_set_miracast(tHalHandle hal, uint8_t filter_type) uint32_t *val; tpAniSirGlobal mac_ptr = PMAC_STRUCT(hal); + if (NULL == mac_ptr) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + "%s: Invalid MAC pointer", __func__); + return eHAL_STATUS_FAILURE; + } val = vos_mem_malloc(sizeof(*val)); - if (NULL == val || NULL == mac_ptr) { + if (NULL == val) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: Invalid pointer", __func__); return eHAL_STATUS_E_MALLOC_FAILED; @@ -14713,8 +14717,8 @@ eHalStatus sme_set_miracast(tHalHandle hal, uint8_t filter_type) if (!VOS_IS_STATUS_SUCCESS( vos_mq_post_message(VOS_MODULE_ID_WDA, &msg))) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, - "%s: Not able to post WDA_SET_MAS_ENABLE_DISABLE to WMA!", - __func__); + "%s: Not able to post SIR_HAL_SET_MIRACAST to WMA!", + __func__); vos_mem_free(val); return eHAL_STATUS_FAILURE; } |
