summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna Kumaar Natarajan <kknatara@qca.qualcomm.com>2015-01-21 18:04:05 -0800
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2015-01-23 16:44:07 +0530
commiteae1ad0f0efa7a80441cabdea9683af4c08047e1 (patch)
treef45239244e1a3a155f8b1b12176487ef58183af5
parent92610600619fd3afb2639c780a3faed5f7ec5ac1 (diff)
qcacld: memset the command buffer in GetCommandBuffer routine
Currently command buffer returned by GetCommandBuffer routine is not memset to zero. If all the fields are not populated, there could be some stale entries which could result in crash. This change set fixes the issue by setting command buffer to zero before returning it to the caller. Change-Id: Icdf22c79a71f41e0cba449b582ded0701e766cae CRs-Fixed: 785556
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index db59cedac329..4c977dcfe151 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -454,7 +454,12 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac )
csrLLUnlock(&pMac->roam.roamCmdPendingList);
}
- return( pRetCmd );
+ /* memset to zero */
+ vos_mem_set((tANI_U8 *)&pRetCmd->command, sizeof(pRetCmd->command), 0);
+ vos_mem_set((tANI_U8 *)&pRetCmd->sessionId, sizeof(pRetCmd->sessionId), 0);
+ vos_mem_set((tANI_U8 *)&pRetCmd->u, sizeof(pRetCmd->u), 0);
+
+ return(pRetCmd);
}