mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-07 19:23:01 -05:00
qcacld-3.0: Fix memory leak in htt_tx_ipa_uc_attach
TX BUF POOL vaddr storage alloc is not freed in htt_tx_ipa_uc_attach when paddr storage allocation fails. Fix is to free memory in failure case. CRs-Fixed: 2034943 Change-Id: Ifb26dfdcff19b3ab66f11a89b9c185777eeec535
This commit is contained in:
parent
b03b252f41
commit
33faae85d7
1 changed files with 3 additions and 1 deletions
|
|
@ -1315,7 +1315,7 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev,
|
|||
if (!pdev->ipa_uc_tx_rsc.paddr_strg) {
|
||||
qdf_print("%s: TX BUF POOL paddr storage alloc fail", __func__);
|
||||
return_code = -ENOBUFS;
|
||||
goto free_tx_comp_base;
|
||||
goto free_tx_buf_pool_vaddr_strg;
|
||||
}
|
||||
|
||||
pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt = htt_tx_ipa_uc_wdi_tx_buf_alloc(
|
||||
|
|
@ -1324,6 +1324,8 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev,
|
|||
|
||||
return 0;
|
||||
|
||||
free_tx_buf_pool_vaddr_strg:
|
||||
qdf_mem_free(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg);
|
||||
free_tx_comp_base:
|
||||
qdf_mem_free_consistent(pdev->osdev, pdev->osdev->dev,
|
||||
tx_comp_ring_size,
|
||||
|
|
|
|||
Loading…
Reference in a new issue