From 07b9785afd620add8c07b378c72abf36c6fff3da Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Tue, 1 Aug 2017 11:10:07 +0530 Subject: [PATCH] qcacld-3.0: Fix timer leak when wma_hold_req_timer timeout When wma_hold_req_timer timer timeout, the timer is not destroyed and thus timer leak is seen while unload. To fix added destroy timer before freeing the hold req. Change-Id: I532975fe13057d96ac924c58d0f42a0010a00a97 CRs-Fixed: 2084993 --- core/wma/src/wma_dev_if.c | 1 + core/wma/src/wma_main.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 3083f72b9031..af02610ede1f 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2763,6 +2763,7 @@ void wma_hold_req_timer(void *data) tgt_req->msg_type, tgt_req->type); QDF_BUG(0); } + qdf_mc_timer_destroy(&tgt_req->event_timeout); qdf_mem_free(tgt_req); } diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index c3216456a72f..5ebc225d409c 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1831,7 +1831,6 @@ static void wma_cleanup_hold_req(tp_wma_handle wma) qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock); /* Cleanup timeout handler */ qdf_mc_timer_stop(&req_msg->event_timeout); - qdf_mc_timer_destroy(&req_msg->event_timeout); wma_hold_req_timer(req_msg); qdf_spin_lock_bh(&wma->wma_hold_req_q_lock); }