bus: mhi: host: Free mhi_buf vector inside mhi_alloc_bhie_table()
mhi_alloc_bhie_table() starts by allocating a vector of struct mhi_buf then it allocates a DMA buffer for each element. If allocation fails, it will free the allocated DMA buffers, but it neglects freeing the mhi_buf vector. Avoid memory leaks by freeing the mhi_buf vector on error. Fixes: 3000f85b ("bus: mhi: core: Add support for basic PM operations") Signed-off-by:Youssef Samir <quic_yabdulra@quicinc.com> Reviewed-by:
Jeffrey Hugo <quic_jhugo@quicinc.com> Reviewed-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241024214715.1208940-1-quic_yabdulra@quicinc.com Signed-off-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Loading
Please sign in to comment