Browse Source

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
Abhishek Singh 7 years ago
parent
commit
07b9785afd
2 changed files with 1 additions and 1 deletions
  1. 1 0
      core/wma/src/wma_dev_if.c
  2. 0 1
      core/wma/src/wma_main.c

+ 1 - 0
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);
 }
 

+ 0 - 1
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);
 	}