linux_dsm_epyc7002/drivers/net/wireless
Colin Ian King d35ef8f846 rsi: fix memory leak on buf and usb_reg_buf
In the cases where len is too long, the error return path fails to
kfree allocated buffers buf and usb_reg_buf.  The simplest fix is to
perform the sanity check on len before the allocations to avoid having
to do the kfree'ing in the first place.

Detected by CoverityScan, CID#1452258,1452259 ("Resource Leak")

Fixes: 59f73e2ae1 ("rsi: check length before USB read/write register")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-18 10:32:41 +09:00
..
admtek License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ath Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-11-15 11:56:19 -08:00
atmel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-11-15 11:56:19 -08:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-11-15 11:56:19 -08:00
cisco License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-11-15 11:56:19 -08:00
intersil orinoco_usb: remove redundant pointer dev 2017-11-08 14:52:22 +02:00
marvell wireless-drivers-next patches for 4.15 2017-11-04 18:07:50 +09:00
mediatek
quantenna qtnfmac: pass all CONNECT cmd params to wireless card for processing 2017-11-10 04:30:58 +02:00
ralink rt2x00: use monotonic timestamps for frame dump 2017-11-10 04:33:05 +02:00
realtek rtlwifi: remove redundant initialization to cfg_cmd 2017-11-08 14:44:42 +02:00
rsi rsi: fix memory leak on buf and usb_reg_buf 2017-11-18 10:32:41 +09:00
st wireless-drivers-next patches for 4.15 2017-11-04 18:07:50 +09:00
ti License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zydas zd1201: remove unused variable framelen 2017-11-08 14:52:57 +02:00
Kconfig
mac80211_hwsim.c genetlink: fix genlmsg_nlhdr() 2017-11-16 10:49:00 +09:00
mac80211_hwsim.h
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ray_cs.c net/wireless/ray_cs: Convert timers to use timer_setup() 2017-10-18 12:39:37 +01:00
ray_cs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rayctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rndis_wlan.c
wl3501_cs.c
wl3501.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00