linux_dsm_epyc7002/drivers/media
Hans Verkuil fded2096b1 media: gscpa/stv06xx: fix memory leak
[ Upstream commit 4f4e6644cd876c844cdb3bea2dd7051787d5ae25 ]

For two of the supported sensors the stv06xx driver allocates memory which
is stored in sd->sensor_priv. This memory is freed on a disconnect, but if
the probe() fails, then it isn't freed and so this leaks memory.

Add a new probe_error() op that drivers can use to free any allocated
memory in case there was a probe failure.

Thanks to Pavel Skripkin <paskripkin@gmail.com> for discovering the cause
of the memory leak.

Reported-and-tested-by: syzbot+e7f4c64a4248a0340c37@syzkaller.appspotmail.com

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11 14:47:29 +02:00
..
cec media: cec: add stm32 driver 2021-02-03 23:28:37 +01:00
common
dvb-core
dvb-frontends
firewire
i2c media: i2c: adv7842: fix possible use-after-free in adv7842_remove() 2021-05-11 14:47:29 +02:00
mc
mmc
pci media: media/saa7164: fix saa7164_encoder_register() memory leak bugs 2021-05-11 14:47:24 +02:00
platform media: sun8i-di: Fix runtime PM imbalance in deinterlace_start_streaming 2021-05-11 14:47:29 +02:00
radio
rc media: ite-cir: check for receive overflow 2021-05-11 14:47:24 +02:00
spi
test-drivers media: vivid: update EDID 2021-05-11 14:47:28 +02:00
tuners media: qm1d1c0042: fix error return code in qm1d1c0042_init() 2021-03-04 11:37:43 +01:00
usb media: gscpa/stv06xx: fix memory leak 2021-05-11 14:47:29 +02:00
v4l2-core media: v4l: ioctl: Fix memory leak in video_usercopy 2021-03-07 12:34:16 +01:00
Kconfig
Makefile