Files
linux/drivers/net/wireless/ath/ath12k
Ma Ke 8175a9f662 wifi: ath12k: mhi: fix potential memory leak in ath12k_mhi_register()
[ Upstream commit 47c27aa7de ]

mhi_alloc_controller() allocates a memory space for mhi_ctrl. When some
errors occur, mhi_ctrl should be freed by mhi_free_controller() and set
ab_pci->mhi_ctrl = NULL.

We can fix it by calling mhi_free_controller() when the failure happens
and set ab_pci->mhi_ctrl = NULL in all of the places where we call
mhi_free_controller().

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230922021036.3604157-1-make_ruc2021@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:19:38 +00:00
..
2023-08-25 10:37:51 +03:00
2023-06-09 16:32:45 +03:00
2023-06-09 16:32:45 +03:00
2023-08-03 12:11:59 +03:00
2023-08-25 10:37:51 +03:00
2023-08-25 10:37:51 +03:00