diff options
author | 2024-10-24 23:47:15 +0200 | |
---|---|---|
committer | 2024-12-02 15:01:06 +0530 | |
commit | 7222ae1d3e4e79a3df37a0668f3718a7898b35df (patch) | |
tree | ad27e8494c478d2b04ff877befed5a45ee989372 /scripts/lib/kdoc/kdoc_files.py | |
parent | Linux 6.13-rc1 (diff) | |
download | linux-rng-7222ae1d3e4e79a3df37a0668f3718a7898b35df.tar.xz linux-rng-7222ae1d3e4e79a3df37a0668f3718a7898b35df.zip |
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: 3000f85b8f47 ("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>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions