From 80ac13b29859e1ce5de63ffb5541ead3dffb77f4 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Tue, 13 Feb 2018 17:19:19 +0800 Subject: [PATCH] qcacld-3.0: Fix size error in htt_tx_ipa_uc_detach Size allocate with sizeof(target_paddr_t) which is following DMA device, but free with sizeof(qdf_nbuf_t) which is a pointer following system. Maybe not same size on some platform. Fix it by using same type when allocate/free. Change-Id: Iadcb68b05ca5798f38c4341323b9fd1e32f5d693 CRs-Fixed: 2189671 --- core/dp/htt/htt_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c index c6667f0dabb2..09f15e7ab2fc 100644 --- a/core/dp/htt/htt_tx.c +++ b/core/dp/htt/htt_tx.c @@ -1425,7 +1425,7 @@ int htt_tx_ipa_uc_detach(struct htt_pdev_t *pdev) qdf_mem_free_consistent( pdev->osdev, pdev->osdev->dev, ol_cfg_ipa_uc_tx_max_buf_cnt(pdev->ctrl_pdev) * - sizeof(qdf_nbuf_t), + sizeof(target_paddr_t), pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr, pdev->ipa_uc_tx_rsc.tx_comp_base.paddr, qdf_get_dma_mem_context((&pdev->ipa_uc_tx_rsc.