Thread (3 messages) 3 messages, 3 authors, 2022-09-10

Re: [PATCH] ath11k: mhi: fix potential memory leak in ath11k_mhi_register()

From: Kalle Valo <kvalo@kernel.org>
Date: 2022-09-10 06:27:33
Also in: ath11k, linux-wireless, lkml

Jianglei Nie [off-list ref] wrote:
mhi_alloc_controller() allocates a memory space for mhi_ctrl. When gets
some error, mhi_ctrl should be freed with mhi_free_controller(). But
when ath11k_mhi_read_addr_from_dt() fails, the function returns without
calling mhi_free_controller(), which will lead to a memory leak.

We can fix it by calling mhi_free_controller() when
ath11k_mhi_read_addr_from_dt() fails.

Signed-off-by: Jianglei Nie <redacted>
Reviewed-by: Jeff Johnson <redacted>
Signed-off-by: Kalle Valo <redacted>
Patch applied to ath-next branch of ath.git, thanks.

43e7c3505ec7 wifi: ath11k: mhi: fix potential memory leak in ath11k_mhi_register()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220907073704.58806-1-niejianglei2021@163.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help