linux-stable/drivers/staging/vt6655
Nam Cao cfdf139258 staging: vt6655: fix potential memory leak
[ Upstream commit c8ff915358 ]

In function device_init_td0_ring, memory is allocated for member
td_info of priv->apTD0Rings[i], with i increasing from 0. In case of
allocation failure, the memory is freed in reversed order, with i
decreasing to 0. However, the case i=0 is left out and thus memory is
leaked.

Modify the memory freeing loop to include the case i=0.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/20220909141338.19343-1-namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-21 12:39:22 +02:00
..
baseband.c staging: vt6655: Rename MACvRegBitsOn 2022-07-14 15:48:38 +02:00
baseband.h
card.c staging: vt6655: Rename MACvWordRegBitsOff 2022-07-14 15:48:38 +02:00
card.h staging: vt6655: Replace unused return value of vt6655_get_current_tsf 2022-05-05 23:21:04 +02:00
channel.c staging: vt6655: Rename MACvRegBitsOn 2022-07-14 15:48:38 +02:00
channel.h
desc.h
device.h
device_cfg.h
device_main.c staging: vt6655: fix potential memory leak 2022-10-21 12:39:22 +02:00
dpc.c
dpc.h
Kconfig
key.c staging: vt6655: Delete tmacro.h 2022-04-20 18:39:47 +02:00
key.h
mac.c staging: vt6655: Convert macro vt6655_mac_clear_stck_ds to function 2022-07-28 10:43:24 +02:00
mac.h staging: vt6655: Convert macro vt6655_mac_clear_stck_ds to function 2022-07-28 10:43:24 +02:00
Makefile
power.c staging: vt6655: Rename MACvRegBitsOff 2022-07-14 15:48:38 +02:00
power.h
rf.c staging: vt6655: Rename MACvWordRegBitsOff 2022-07-14 15:48:38 +02:00
rf.h
rxtx.c Staging driver patches for 6.0-rc1 2022-08-04 12:01:42 -07:00
rxtx.h
srom.c staging: vt6655: Delete upc.h 2022-06-06 07:58:41 +02:00
srom.h
test
TODO