linux_dsm_epyc7002/drivers/net/wireless/rsi
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
..
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rsi_91x_core.c
rsi_91x_debugfs.c
rsi_91x_hal.c
rsi_91x_mac80211.c rsi: fix kbuild reported build errors with CONFIG_PM off 2017-11-02 19:38:14 +02:00
rsi_91x_main.c
rsi_91x_mgmt.c rsi: fix kbuild reported build errors with CONFIG_PM off 2017-11-02 19:38:14 +02:00
rsi_91x_ps.c rsi: rsi_91x_ps: remove redundant code in str_psstate 2017-11-10 04:36:10 +02:00
rsi_91x_sdio_ops.c
rsi_91x_sdio.c rsi: move rsi_sdio_reinit_device() out of CONFIG_PM 2017-11-02 19:38:14 +02:00
rsi_91x_usb_ops.c
rsi_91x_usb.c rsi: fix memory leak on buf and usb_reg_buf 2017-11-18 10:32:41 +09:00
rsi_boot_params.h
rsi_common.h rsi: fix kbuild reported build errors with CONFIG_PM off 2017-11-02 19:38:14 +02:00
rsi_debugfs.h
rsi_hal.h
rsi_main.h
rsi_mgmt.h rsi: fix kbuild reported build errors with CONFIG_PM off 2017-11-02 19:38:14 +02:00
rsi_ps.h
rsi_sdio.h rsi: move rsi_sdio_reinit_device() out of CONFIG_PM 2017-11-02 19:38:14 +02:00
rsi_usb.h