linux-stable/drivers/media/usb
José Expósito f0f078457f media: uvcvideo: Fix memory leak in uvc_gpio_parse
Previously the unit buffer was allocated before checking the IRQ for
privacy GPIO. In case of error, the unit buffer was leaked.

Allocate the unit buffer after the IRQ to avoid it.

Addresses-Coverity-ID: 1474639 ("Resource leak")

Fixes: 2886477ff9 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-08-30 16:04:19 +02:00
..
airspy media: airspy: fix memory leak in airspy probe 2022-08-30 07:31:42 +02:00
as102 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
au0828 media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
b2c2 media: b2c2-flexcop-usb: fix some whitespace coding style 2021-12-14 16:19:04 +01:00
cx231xx media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
dvb-usb media: technisat-usb2: Fix comment typo 2022-08-29 15:32:14 +02:00
dvb-usb-v2 media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
em28xx media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
go7007 media: usb: go7007: s2250-board: fix leak in probe() 2022-02-22 09:41:12 +01:00
gspca media: gspca: Fix typo 'the the' in comment 2022-08-29 15:32:14 +02:00
hackrf media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
hdpvr media: hdpvr: fix error value returns in hdpvr_read 2022-06-27 09:02:50 +01:00
msi2500 media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
pvrusb2 media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
pwc media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
s2255 media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
siano media: siano: remove duplicate USB device IDs 2021-12-07 11:29:58 +01:00
stk1160 media: stk1160: use dma_alloc_noncontiguous API 2022-03-07 11:01:22 +01:00
ttusb-budget media: dvb-ttusb-budget: cleanup printk logic 2020-09-03 11:15:47 +02:00
ttusb-dec media: ttusb-dec: avoid release of non-acquired mutex 2021-09-30 10:07:40 +02:00
usbtv media: usbtv: Add PAL-Nc standard 2022-06-20 10:30:30 +01:00
uvc media: uvcvideo: Fix memory leak in uvc_gpio_parse 2022-08-30 16:04:19 +02:00
Kconfig media: tm6000: deprecate this driver 2022-08-29 16:43:00 +02:00
Makefile media: tm6000: deprecate this driver 2022-08-29 16:43:00 +02:00