summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumantha Reddy Pothula <c_hpothu@qti.qualcomm.com>2016-04-27 20:03:38 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-05-16 14:13:21 +0530
commitd0aa80b5ef798dcd9e5cd34a4a3cb877b00ba906 (patch)
treec0699495801f1d4175fa45e080c99d5202354add
parent899c45963b5ee8a2df8d7de2a4394ff042ab9b80 (diff)
qcacld-2.0: Resolve memory leak issues
prima to qcacld-2.0 propagation In SME, if command posting fails then memory allocated for command is not freed. Free the memory if SME fails to post command. Change-Id: I281ef5eb9492fe75d639b2bef7ed588aacee8e74 CRs-Fixed: 974567
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index eea90b299b2c..ab150e7c3896 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -2690,6 +2690,7 @@ eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
if(status != eHAL_STATUS_SUCCESS)
pSmeRrmContext->eseBcnReqInProgress = FALSE;
+ vos_mem_free(pSmeBcnReportReq);
return status;
}
@@ -7616,6 +7617,7 @@ eHalStatus smeIssueFastRoamNeighborAPEvent(tHalHandle hHal,
pUsrCtx = vos_mem_malloc(sizeof(*pUsrCtx));
if (NULL == pUsrCtx) {
smsLog(pMac, LOGE, FL("Memory allocation failed"));
+ sme_ReleaseGlobalLock( &pMac->sme );
return eHAL_STATUS_FAILED_ALLOC;
}
@@ -12501,6 +12503,7 @@ eHalStatus sme_get_rssi(tHalHandle hal, struct sir_rssi_req req,
if (!VOS_IS_STATUS_SUCCESS(vosstatus)) {
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: Post get rssi msg fail", __func__);
+ vos_mem_free(vosmessage.bodyptr);
status = eHAL_STATUS_FAILURE;
}
sme_ReleaseGlobalLock(&mac->sme);
@@ -14505,6 +14508,12 @@ eHalStatus sme_SendRateUpdateInd(tHalHandle hHal,
sme_ReleaseGlobalLock(&pMac->sme);
return eHAL_STATUS_SUCCESS;
}
+ else
+ {
+ vos_mem_free(rateUpdate);
+ VOS_TRACE( VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("sme_AcquireGlobalLock error"));
+ }
return status;
}