Parcourir la source

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
Will Huang il y a 7 ans
Parent
commit
80ac13b298
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      core/dp/htt/htt_tx.c

+ 1 - 1
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.