mirror_ubuntu-kernels/drivers/net/wireless
Dan Carpenter 4894edacfa wilc1000: fix double free error in probe()
Smatch complains that there is a double free in probe:

drivers/net/wireless/microchip/wilc1000/spi.c:186 wilc_bus_probe() error: double free of 'spi_priv'
drivers/net/wireless/microchip/wilc1000/sdio.c:163 wilc_sdio_probe() error: double free of 'sdio_priv'

The problem is that wilc_netdev_cleanup() function frees "wilc->bus_data".
That's confusing and a layering violation.  Leave the frees in probe(),
delete the free in wilc_netdev_cleanup(), and add some new frees to the
remove() functions.

Fixes: dc8b338f3b ("wilc1000: use goto labels on error path")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211217150311.GC16611@kili
2021-12-20 20:44:03 +02:00
..
admtek
ath wireless-drivers-next patches for v5.17 2021-12-17 07:30:07 -08:00
atmel atmel: use eth_hw_addr_set() 2021-10-20 12:39:44 +03:00
broadcom wireless-drivers-next patches for v5.17 2021-12-17 07:30:07 -08:00
cisco airo: use eth_hw_addr_set() 2021-10-20 12:39:45 +03:00
intel iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm() 2021-12-20 20:41:30 +02:00
intersil intersil: Use struct_group() for memcpy() region 2021-11-29 12:45:17 +02:00
marvell libertas_tf: Add missing __packed annotations 2021-12-08 20:39:54 +02:00
mediatek mt76: mt7921s: fix cmd timeout in throughput test 2021-12-19 15:24:05 +01:00
microchip wilc1000: fix double free error in probe() 2021-12-20 20:44:03 +02:00
quantenna wireless: use eth_hw_addr_set() instead of ether_addr_copy() 2021-10-20 12:39:42 +03:00
ralink rt2x00: do not mark device gone on EPROTO errors during start 2021-11-29 12:53:50 +02:00
realtek rtw89: coex: Update COEX to 5.5.8 2021-12-14 20:36:02 +02:00
rsi rsi: fix array out of bound 2021-12-15 16:28:26 +02:00
st wireless: Remove redundant 'flush_workqueue()' calls 2021-10-13 09:22:19 +03:00
ti wl1251: specify max. IE length 2021-12-16 10:28:38 +02:00
zydas zd1201: use eth_hw_addr_set() 2021-10-20 12:39:47 +03:00
Kconfig
mac80211_hwsim.c Quite a few changes: 2021-10-22 10:20:56 -07:00
mac80211_hwsim.h
Makefile
ray_cs.c ray_cs: use eth_hw_addr_set() 2021-10-20 12:39:46 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c wireless: Remove redundant 'flush_workqueue()' calls 2021-10-13 09:22:19 +03:00
virt_wifi.c virt_wifi: fix error on connect 2021-07-23 10:34:31 +02:00
wl3501_cs.c wl3501_cs: use eth_hw_addr_set() 2021-10-20 12:39:47 +03:00
wl3501.h wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join 2021-04-22 17:38:41 +03:00