diff options
| author | Ryan Hsu <ryanhsu@qca.qualcomm.com> | 2014-06-15 22:38:18 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-06-21 02:10:04 -0700 |
| commit | debe6ca5259c02172a2d3fa228ce1a3ba74db028 (patch) | |
| tree | 5bde5cd659cfc11f6d53f2931fbe736456b9a016 | |
| parent | 78829cc63e7c2639e11fe59fab9f1d910da26465 (diff) | |
qcacld: wma: fix memleak
In case of SAP running in DFS channel, ic_curchan would be allocated
while it was first brought up. When it detected the radar and
restarted the SAP after randomly picking channel, the ic_curchan was
still holding the memory allocated. Add sanity checking and release the
memory if it was allocated.
Change-Id: Ie9f92c636ad0e15444403ae2a5ed670eca23c554
CRs-fixed: 680517
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index ee2ff00cf40c..806c86079758 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -6914,6 +6914,12 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma, return VOS_STATUS_E_FAILURE; } + if (wma->dfs_ic->ic_curchan) + { + OS_FREE(wma->dfs_ic->ic_curchan); + wma->dfs_ic->ic_curchan = NULL; + } + /* provide the current channel to DFS */ wma->dfs_ic->ic_curchan = wma_dfs_configure_channel(wma->dfs_ic,chan,chanmode,req); |
