Files
linux/drivers/net/wireless/ath/ath11k
Jianglei Nie 015ced9eb6 wifi: ath11k: mhi: fix potential memory leak in ath11k_mhi_register()
[ Upstream commit 43e7c3505e ]

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 <niejianglei2021@163.com>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220907073704.58806-1-niejianglei2021@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-21 12:39:08 +02:00
..
2022-02-24 11:02:48 +02:00
2021-11-17 09:29:34 +02:00
2022-02-24 11:02:48 +02:00
2022-02-24 10:59:20 +02:00
2022-02-24 10:59:20 +02:00
2021-02-17 11:32:48 +02:00
2022-07-08 16:52:17 +03:00
2022-04-06 11:31:40 +03:00
2022-03-25 12:31:10 +02:00
2021-11-17 09:29:34 +02:00
2022-03-18 17:34:37 +02:00