linux/drivers/media/usb
Christophe JAILLET 2b6e20ef05 media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
[ Upstream commit ea9ef6c2e0 ]

'read' is freed when it is known to be NULL, but not when a read error
occurs.

Revert the logic to avoid a small leak, should a m920x_read() call fail.

Fixes: a2ab06d7c4 ("media: m920x: don't use stack on USB reads")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:50 +02:00
..
airspy
as102
au0828
b2c2
cx231xx
dvb-usb
dvb-usb-v2
em28xx
go7007
gspca
hackrf
hdpvr
msi2500
pvrusb2
pwc
s2255
siano
stk1160
ttusb-budget
ttusb-dec
usbtv
uvc
Kconfig
Makefile