WSL2-Linux-Kernel/drivers/net/wireless/broadcom
Keita Suzuki f4443293d7 brcmsmac: fix memory leak in wlc_phy_attach_lcnphy
When wlc_phy_txpwr_srom_read_lcnphy fails in wlc_phy_attach_lcnphy,
the allocated pi->u.pi_lcnphy is leaked, since struct brcms_phy will be
freed in the caller function.

Fix this by calling wlc_phy_detach_lcnphy in the error handler of
wlc_phy_txpwr_srom_read_lcnphy before returning.

Signed-off-by: Keita Suzuki <keitasuzuki.park@sslab.ics.keio.ac.jp>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200908121743.23108-1-keitasuzuki.park@sslab.ics.keio.ac.jp
2020-09-09 10:32:29 +03:00
..
b43 b43: phy_ht: Remove 9 year old TODO 2020-09-01 12:22:38 +03:00
b43legacy b43legacy: convert tasklets to use new tasklet_setup() API 2020-08-27 16:22:04 +03:00
brcm80211 brcmsmac: fix memory leak in wlc_phy_attach_lcnphy 2020-09-09 10:32:29 +03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00