qcacld-3.0: Fix the double free for the txrx stats req

The txrx stats req has been freed in the ol_txrx_pdev_detach by checking
req_list of pdev.
Remove the txrx stats req free in the ol_txrx_fw_stats_desc_pool_deinit
to avoid the double free.

Change-Id: Idb2d5517e90ee873e7fd62d58c48a4f793266bac
CRs-Fixed: 2272696
This commit is contained in:
Tiger Yu 2018-07-05 10:22:19 +08:00 • committed by nshrivas
commit 415a97e476

View file

@ -4247,9 +4247,6 @@ int ol_txrx_fw_stats_desc_pool_init(struct ol_txrx_pdev_t *pdev,
*/
void ol_txrx_fw_stats_desc_pool_deinit(struct ol_txrx_pdev_t *pdev)
{
struct ol_txrx_fw_stats_desc_elem_t *desc;
uint8_t i;
if (!pdev) {
ol_txrx_err("%s: pdev is NULL", __func__);
return;
@ -4264,11 +4261,6 @@ void ol_txrx_fw_stats_desc_pool_deinit(struct ol_txrx_pdev_t *pdev)
}
qdf_spin_lock_bh(&pdev->ol_txrx_fw_stats_desc_pool.pool_lock);
qdf_atomic_set(&pdev->ol_txrx_fw_stats_desc_pool.initialized, 0);
for (i = 0; i < pdev->ol_txrx_fw_stats_desc_pool.pool_size; i++) {
desc = &pdev->ol_txrx_fw_stats_desc_pool.pool[i];
if (desc && desc->desc.req)
qdf_mem_free(desc->desc.req);
}
qdf_mem_free(pdev->ol_txrx_fw_stats_desc_pool.pool);
pdev->ol_txrx_fw_stats_desc_pool.pool = NULL;