1
0
Fork 0
alistair23-linux/drivers/net/wireless/broadcom/brcm80211/brcmsmac
Keita Suzuki d5eb55b5f9 brcmsmac: fix memory leak in wlc_phy_attach_lcnphy
[ Upstream commit f4443293d7 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:58:07 +01:00
..
phy brcmsmac: fix memory leak in wlc_phy_attach_lcnphy 2020-10-29 09:58:07 +01:00
Makefile wireless: prefix header search paths with $(srctree)/ 2019-02-01 14:42:25 +02:00
aiutils.c
aiutils.h
ampdu.c
ampdu.h
antsel.c
antsel.h
brcms_trace_brcmsmac.h
brcms_trace_brcmsmac_msg.h
brcms_trace_brcmsmac_tx.h
brcms_trace_events.c
brcms_trace_events.h
channel.c
channel.h
d11.h
debug.c brcmsmac: no need to check return value of debugfs_create functions 2019-02-01 14:37:28 +02:00
debug.h brcmsmac: no need to check return value of debugfs_create functions 2019-02-01 14:37:28 +02:00
dma.c
dma.h
led.c
led.h
mac80211_if.c brcmsmac: never log "tid x is not agg'able" by default 2018-11-06 19:01:00 +02:00
mac80211_if.h
main.c brcmsmac: remove three set but not used variables 2019-08-06 15:37:43 +03:00
main.h brcmsmac: AP mode: update beacon when TIM changes 2018-10-13 20:00:42 +03:00
phy_shim.c
phy_shim.h
pmu.c
pmu.h
pub.h
rate.c
rate.h
scb.h
stf.c
stf.h
types.h
ucode_loader.c
ucode_loader.h