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
This commit is contained in:
Abhishek Singh 2017-08-01 11:10:07 +05:30 • committed by snandini
commit 07b9785afd
2 changed files with 1 additions and 1 deletions

View file

@ -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);
}

View file

@ -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);
}