qcacld-3.0: Fix memory leak in sme

In some places memory allocated for the parsed IE’s
using csr_get_parsed_bss_description_ies are freed only
if existing IE description is NULL. Even though memory
allocation not done based on above condition, this may
lead to memory leak..

To fix this make sure to check existing IE description
while allocating memory.

Change-Id: Ia065b9ebb4cbd00f48f3cdca8737190b3609e1c7
CRs-Fixed: 2002298
This commit is contained in:
Arif Hussain 2017-02-05 17:38:16 -08:00 • committed by snandini
commit fdb25e2022
2 changed files with 5 additions and 1 deletions

View file

@ -16238,6 +16238,8 @@ free_scan_flter:
csr_free_scan_filter(mac_ctx, scan_filter);
qdf_mem_free(scan_filter);
}
if (result_handle)
csr_scan_result_purge(mac_ctx, result_handle);
return status;
}

View file

@ -5555,7 +5555,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx,
} else {
cmd->u.roamCmd.roamProfile.uapsd_mask = 0;
}
if (ies_local && !result->pvIes)
if (ies_local && !scan_result->Result.pvIes)
qdf_mem_free(ies_local);
roam_info_ptr->pProfile = profile;
session->bRefAssocStartCnt++;
@ -9898,6 +9898,8 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac,
qdf_mem_free(pScanFilter);
qdf_mem_free(roamInfo);
return;
} else {
csr_scan_result_purge(pMac, hBSSList);
}
csr_scan_result_purge(pMac, hBSSList);