From a87af3e71fbabf78a365f8d99e8e7698347d597f Mon Sep 17 00:00:00 2001 From: Vevek Venkatesan Date: Fri, 11 Dec 2020 14:13:07 +0530 Subject: [PATCH] qcacld-3.0: free fisa rx element from fst_update_list in deinit During dp_rx_fst_cmem_deinit, free dp_fisa_rx_fst_update_elem from the fst_update_list. Change-Id: Ie3445bc4b06cba3e72cf44fe09417b9528115c1e CRs-Fixed: 2833805 --- core/dp/txrx3.0/dp_rx_fst.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/dp/txrx3.0/dp_rx_fst.c b/core/dp/txrx3.0/dp_rx_fst.c index 24367adedc17..6e5a0af6df2c 100644 --- a/core/dp/txrx3.0/dp_rx_fst.c +++ b/core/dp/txrx3.0/dp_rx_fst.c @@ -133,13 +133,24 @@ static void dp_fisa_fse_cache_flush_timer(void *arg) */ static void dp_rx_fst_cmem_deinit(struct dp_rx_fst *fst) { + struct dp_fisa_rx_fst_update_elem *elem; + qdf_list_node_t *node; int i; qdf_cancel_work(&fst->fst_update_work); qdf_flush_work(&fst->fst_update_work); qdf_flush_workqueue(0, fst->fst_update_wq); - qdf_destroy_workqueue(0, fst->fst_update_wq); + + qdf_spin_lock_bh(&fst->dp_rx_fst_lock); + while (qdf_list_peek_front(&fst->fst_update_list, &node) == + QDF_STATUS_SUCCESS) { + elem = (struct dp_fisa_rx_fst_update_elem *)node; + qdf_list_remove_front(&fst->fst_update_list, &node); + qdf_mem_free(elem); + } + qdf_spin_unlock_bh(&fst->dp_rx_fst_lock); + qdf_list_destroy(&fst->fst_update_list); qdf_event_destroy(&fst->cmem_resp_event);