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:
Poddar, Siddarth 2017-04-18 14:05:09 +05:30 • committed by snandini
commit 33faae85d7

View file

@ -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,