summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhqu <hqu@codeaurora.org>2018-11-30 19:48:25 +0800
committerhqu <hqu@codeaurora.org>2018-12-19 16:18:10 +0800
commit0ea8fde83248b31dbf6ee716def20400c0c4930e (patch)
tree29981c49d58e7f7ab7b16643dec3458dbc30134c
parentda44b3353ab2b9c76f8d7b3753dad1ec5a96a950 (diff)
qcacld-3.0: Fix two memory leak in function wma_vdev_resp_timer
In wma_vdev_resp_timer(), while handling WMA_CHNL_SWITCH_REQ and WMA_ADD_BSS_REQ if wma_crash_on_fw_timeout() is true, SSR is triggered, but user_data isn't freed, result in memory leak. Fix is to still do wma_send_msg_high_priority() when wma_crash_on_fw_timeout()is true, so user_data can be freed. Change-Id: If61f196485d74d17c58dc0698276c9eebf06c5f5 CRs-Fixed: 2369092
-rw-r--r--core/wma/src/wma_dev_if.c42
1 files changed, 19 insertions, 23 deletions
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 3f56f0813443..290f4eb8738d 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -3289,13 +3289,11 @@ void wma_vdev_resp_timer(void *data)
* Trigger host crash if the flag is set or if the timeout
* is not due to fw down
*/
- if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true) {
+ if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true)
wma_trigger_recovery_assert_on_fw_timeout(
WMA_CHNL_SWITCH_REQ);
- } else {
- wma_send_msg_high_priority(wma, WMA_SWITCH_CHANNEL_RSP,
- (void *)params, 0);
- }
+ wma_send_msg_high_priority(wma, WMA_SWITCH_CHANNEL_RSP,
+ (void *)params, 0);
if (wma->interfaces[tgt_req->vdev_id].is_channel_switch) {
wma->interfaces[tgt_req->vdev_id].is_channel_switch =
false;
@@ -3426,27 +3424,25 @@ void wma_vdev_resp_timer(void *data)
WMA_LOGA("%s: WMA_ADD_BSS_REQ timedout", __func__);
WMA_LOGD("%s: bssid %pM vdev_id %d", __func__, params->bssId,
tgt_req->vdev_id);
- if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true) {
+ if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true)
wma_trigger_recovery_assert_on_fw_timeout(
- WMA_ADD_BSS_REQ);
- } else {
- /* Send vdev stop to the FW */
- if (wma_send_vdev_stop_to_fw(wma, tgt_req->vdev_id))
- WMA_LOGE("%s: Failed to send vdev stop to fw",
- __func__);
+ WMA_ADD_BSS_REQ);
+ /* Send vdev stop to the FW */
+ if (wma_send_vdev_stop_to_fw(wma, tgt_req->vdev_id))
+ WMA_LOGE("%s: Failed to send vdev stop to fw",
+ __func__);
- peer = ol_txrx_find_peer_by_addr(pdev, params->bssId,
- &peer_id);
- if (peer)
- wma_remove_peer(wma, params->bssId,
- tgt_req->vdev_id, peer, false);
- else
- WMA_LOGE("%s: Failed to find peer", __func__);
+ peer = ol_txrx_find_peer_by_addr(pdev, params->bssId,
+ &peer_id);
+ if (peer)
+ wma_remove_peer(wma, params->bssId,
+ tgt_req->vdev_id, peer, false);
+ else
+ WMA_LOGE("%s: Failed to find peer", __func__);
- wma_send_msg_high_priority(wma,
- WMA_ADD_BSS_RSP, (void *)params, 0);
- QDF_ASSERT(0);
- }
+ wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP,
+ (void *)params, 0);
+ QDF_ASSERT(0);
goto free_tgt_req;
} else if (tgt_req->msg_type == WMA_OCB_SET_CONFIG_CMD) {