mhi: core: Fix memory leak in MHI DE_INIT
During MHI INIT, memory is allocated for firmware and rddm vector table. This memory is not freed when DE_INIT is called. CRs-Fixed: 2053206 Change-Id: I85b2644189915dd25d8ac31190f16799f86cbd12 Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
This commit is contained in:
parent
fb7523d08f
commit
6491d72c2a
1 changed files with 2 additions and 0 deletions
|
@ -598,6 +598,7 @@ void bhi_exit(struct mhi_device_ctxt *mhi_dev_ctxt)
|
|||
dma_free_coherent(dev, bhie_mem_info->alloc_size,
|
||||
bhie_mem_info->pre_aligned,
|
||||
bhie_mem_info->dma_handle);
|
||||
kfree(fw_table->bhie_mem_info);
|
||||
fw_table->bhie_mem_info = NULL;
|
||||
/* vector table is the last entry in bhie_mem_info */
|
||||
fw_table->bhi_vec_entry = NULL;
|
||||
|
@ -613,6 +614,7 @@ void bhi_exit(struct mhi_device_ctxt *mhi_dev_ctxt)
|
|||
dma_free_coherent(dev, bhie_mem_info->alloc_size,
|
||||
bhie_mem_info->pre_aligned,
|
||||
bhie_mem_info->dma_handle);
|
||||
kfree(rddm_table->bhie_mem_info);
|
||||
rddm_table->bhie_mem_info = NULL;
|
||||
rddm_table->bhi_vec_entry = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue