diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-10-07 11:51:29 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-07 11:51:29 -0700 |
| commit | 6f9b664a8ca6a4a273bc6bec6baf3b81f65357c4 (patch) | |
| tree | 21b89589c4469ffbd8b35599a6222286953b9b1e | |
| parent | cb792840695ba89397553249d262bd8688dbe2d4 (diff) | |
| parent | 8f72c5dab7cd274655a93da86358fa7a8047917a (diff) | |
Merge "qcacld-2.0: Fix memory leak issue" into wlan-cld2.driver.lnx.1.0-dev
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index bb5fccaa4567..db6f8faccde1 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -36459,20 +36459,12 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic, WMA_LOGE("%s:DFS- Invalid WMA handle", __func__); return -ENOENT; } - radar_event = (struct wma_dfs_radar_indication *) - vos_mem_malloc(sizeof(struct wma_dfs_radar_indication)); - if (radar_event == NULL) - { - WMA_LOGE("%s:DFS- Invalid radar_event", __func__); - return -ENOENT; - } /* * Do not post multiple Radar events on the same channel. * But, when DFS test mode is enabled, allow multiple dfs * radar events to be posted on the same channel. */ - adf_os_spin_lock_bh(&ic->chan_lock); if (!pmac->sap.SapDfsInfo.disable_dfs_ch_switch) wma->dfs_ic->disable_phy_err_processing = true; @@ -36480,6 +36472,13 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic, if ((ichan->ic_ieee != (wma->dfs_ic->last_radar_found_chan)) || ( pmac->sap.SapDfsInfo.disable_dfs_ch_switch == VOS_TRUE) ) { + radar_event = (struct wma_dfs_radar_indication *) + vos_mem_malloc(sizeof(*radar_event)); + if (radar_event == NULL) { + WMA_LOGE(FL("Failed to allocate memory for radar_event")); + return -ENOMEM; + } + /* Indicate the radar event to HDD to stop the netif Tx queues*/ hdd_radar_event.ieee_chan_number = ichan->ic_ieee; hdd_radar_event.chan_freq = ichan->ic_freq; |
