summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar <rajekuma@qca.qualcomm.com>2014-02-04 16:32:07 -0800
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-02-06 15:59:42 -0800
commitc1b2e112a71dac28d3eb35cfd49318b30706f9d8 (patch)
tree975f04f7f70fa356f5b41774d752d0368d6c2a92
parent224f4b6a8e0bc21854434e2d83cdcc5daf33af04 (diff)
qcacld: Fix of double free panic for P2P message
In CLD SLUB debug build double free is considered as panic so whenever a pointer which is not allocated using VOS API is freed using VOS API SLUB debug driver treats it as a double free and calls panic. Using vos_mem_malloc to allocate message for SIR_HAL_P2P_NOA_ATTR_IND in WMA which is later freed in PE using vos_mem_free(). Change-Id: Id97c453b2676b4fe81f12e7067c961e854592745 CRs-Fixed: 611488
-rw-r--r--CORE/SERVICES/WMA/wma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 6cfd67315154..64da3364afec 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -1348,15 +1348,14 @@ static void wma_update_noa(struct beacon_info *beacon,
static void wma_update_probe_resp_noa(tp_wma_handle wma_handle,
struct p2p_sub_element_noa *noa_ie)
{
- tSirP2PNoaAttr *noa_attr = (tSirP2PNoaAttr *) adf_os_mem_alloc(
- NULL, sizeof(tSirP2PNoaAttr));
+ tSirP2PNoaAttr *noa_attr = (tSirP2PNoaAttr *) vos_mem_malloc(sizeof(tSirP2PNoaAttr));
WMA_LOGD("Received update NoA event");
if (!noa_attr) {
WMA_LOGE("Failed to allocate memory for tSirP2PNoaAttr");
return;
}
- adf_os_mem_set(noa_attr, 0, sizeof(tSirP2PNoaAttr));
+ vos_mem_zero(noa_attr, sizeof(tSirP2PNoaAttr));
noa_attr->index = noa_ie->index;
noa_attr->oppPsFlag = noa_ie->oppPS;