diff options
| author | lifeng <lifeng@codeaurora.org> | 2017-06-12 18:31:06 +0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-06-13 23:44:01 -0700 |
| commit | 6998ebca08e5f9b256480a98671de2bdcfb1bd30 (patch) | |
| tree | 7f1fc209d1c3b9c01ff06fb55a6f9f1bd0508b1b | |
| parent | be4fad0821cefe17cda3c54ace1a7b2040b4f800 (diff) | |
qcacld-2.0: Fix memory leak in acs procedure
Free the memory for channel list once the scanStatus is NOT
eCSR_SCAN_SUCCESS in WLANSAP_PreStartBssAcsScanCallback.
Change-Id: Id2d7fe5d7df8c032d50f02880deedb2ed1ac79fd
CRs-Fixed: 2059751
| -rw-r--r-- | CORE/SAP/src/sapApiLinkCntl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c index f238abcecfeb..f88e311dc9d1 100644 --- a/CORE/SAP/src/sapApiLinkCntl.c +++ b/CORE/SAP/src/sapApiLinkCntl.c @@ -535,6 +535,20 @@ WLANSAP_PreStartBssAcsScanCallback } else { +#ifdef SOFTAP_CHANNEL_RANGE + if(psapContext->channelList != NULL) + { + /* + * Always free up the memory for + * channel selection whatever + * the result + */ + vos_mem_free(psapContext->channelList); + psapContext->channelList = NULL; + psapContext->num_of_channel = 0; + } +#endif + VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, FL("CSR scanStatus = %s (%d), choose default channel"), "eCSR_SCAN_ABORT/FAILURE", scanStatus ); |
