mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
qcacld-3.0: Fix memory leak in restart bss path
Function sapconvert_to_csr_profile is allocating memory for pRSNReqIE without checking if it is already populated. This will leak memory if this function is getting called for sap restart. Fix this by first freeing memory if already allocated. Change-Id: I562b1dabb330057b4f1b934b0edad692330aab70 CRs-Fixed: 2046608
This commit is contained in:
parent
0c0ae02833
commit
8021e459e1
1 changed files with 7 additions and 1 deletions
|
|
@ -3649,8 +3649,14 @@ sapconvert_to_csr_profile(tsap_Config_t *pconfig_params, eCsrRoamBssType bssType
|
|||
profile->pWPAReqIE = NULL;
|
||||
profile->nWPAReqIELength = 0;
|
||||
|
||||
if (profile->pRSNReqIE) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
FL("pRSNReqIE already allocated."));
|
||||
qdf_mem_free(profile->pRSNReqIE);
|
||||
profile->pRSNReqIE = NULL;
|
||||
}
|
||||
|
||||
/* set the RSN/WPA IE */
|
||||
profile->pRSNReqIE = NULL;
|
||||
profile->nRSNReqIELength = pconfig_params->RSNWPAReqIELength;
|
||||
if (pconfig_params->RSNWPAReqIELength) {
|
||||
profile->pRSNReqIE =
|
||||
|
|
|
|||
Loading…
Reference in a new issue