linux/drivers/staging
Nam Cao 2a2db520e3 staging: vt6655: fix some erroneous memory clean-up loops
In some initialization functions of this driver, memory is allocated with
'i' acting as an index variable and increasing from 0. The commit in
"Fixes" introduces some clean-up codes in case of allocation failure,
which free memory in reverse order with 'i' decreasing to 0. However,
there are some problems:
  - The case i=0 is left out. Thus memory is leaked.
  - In case memory allocation fails right from the start, the memory
    freeing loops will start with i=-1 and invalid memory locations will
    be accessed.

One of these loops has been fixed in commit c8ff915358 ("staging:
vt6655: fix potential memory leak"). Fix the remaining erroneous loops.

Link: https://lore.kernel.org/linux-staging/Yx9H1zSpxmNqx6Xc@kadam/
Fixes: 5341ee0adb ("staging: vt6655: check for memory allocation failures")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/20220912170429.29852-1-namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24 13:05:24 +02:00
..
axis-fifo
board
clocking-wizard
emxx_udc
fbtft staging: fbtft: core: set smem_len before fb_deferred_io_init call 2022-07-28 10:42:42 +02:00
fieldbus staging: fieldbus: Fix the error handling path in anybuss_host_common_probe() 2022-04-22 16:48:31 +02:00
fwserial staging: fwserial: Switch to kfree_rcu() API 2022-09-24 12:55:22 +02:00
gdm724x staging: gdm724x: drop unused CDC defines 2022-07-25 10:57:42 +02:00
greybus staging: greybus: audio_helper: remove unused and wrong debugfs usage 2022-09-09 09:53:26 +02:00
iio staging: iio: ad2s1210: remove redundant assignment to variable negative 2022-04-28 19:22:56 +01:00
ks7010 staging: ks7010: remove null check after call container_of() 2022-05-19 17:42:41 +02:00
media hantro: Remove incorrect HEVC SPS validation 2022-07-27 20:55:02 +02:00
most staging/most, dim2: convert dim2_tasklet to threaded irq 2022-04-12 15:53:50 +02:00
nvec Staging: nvec: Fix ending in '(' error 2022-02-08 10:46:01 +01:00
octeon staging: switch to netif_napi_add_weight() 2022-07-08 14:28:21 +02:00
olpc_dcon Merge 5.19-rc3 into staging-next 2022-06-20 08:59:23 +02:00
pi433 staging: pi433: fix wrong debug message on rf69_write_fifo() 2022-08-16 15:11:19 +02:00
qlge Staging driver patches for 6.0-rc1 2022-08-04 12:01:42 -07:00
r8188eu staging: r8188eu: rtw_is_scan_deny is always false 2022-09-11 13:57:23 +02:00
rtl8192e staging: rtl8192e: Remove ftrace-like logging in rtl819x_BAProc.c, ... 2022-09-24 12:59:53 +02:00
rtl8192u staging: rtl8192u: fix rmmod warn when device is renamed 2022-08-16 15:13:27 +02:00
rtl8712 staging: rtl8712: Fix return type for implementation of ndo_start_xmit 2022-09-09 09:55:24 +02:00
rtl8723bs staging: rtl8723bs: Add a blank line after declarations 2022-09-24 13:02:39 +02:00
rts5208 staging: rts5208: spi.c: fix codestyle error in dynamic debug code 2022-06-06 07:53:49 +02:00
sm750fb staging: sm750fb: split multiple assignments to lines 2022-08-24 15:13:51 +02:00
vc04_services staging: vchiq_arm: Add missing memory barrier comments 2022-06-27 13:50:19 +02:00
vme_user staging: vme_user: Fix checkpatch warnings in vme_tsi148.c 2022-08-16 15:11:48 +02:00
vt6655 staging: vt6655: fix some erroneous memory clean-up loops 2022-09-24 13:05:24 +02:00
vt6656 wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
wlan-ng staging: wlan-ng: remove unused p80211wext_handler_def declaration 2022-09-11 13:59:49 +02:00
Kconfig staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
Makefile staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00