linux/drivers/media/radio
Shaurya Rane 1d8558a232 media: radio-keene: fix memory leak in error path
[ Upstream commit b8bf939d77 ]

Fix a memory leak in usb_keene_probe(). The v4l2 control handler is
initialized and controls are added, but if v4l2_device_register() or
video_register_device() fails afterward, the handler was never freed,
leaking memory.

Add v4l2_ctrl_handler_free() call in the err_v4l2 error path to ensure
the control handler is properly freed for all error paths after it is
initialized.

Reported-by: syzbot+a41b73dce23962a74c72@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=a41b73dce23962a74c72
Fixes: 1bf20c3a0c ("[media] radio-keene: add a driver for the Keene FM Transmitter")
Cc: stable@vger.kernel.org
Signed-off-by: Shaurya Rane <ssrane_b23@ee.vjti.ac.in>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:21:00 -05:00
..
si470x move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
si4713 media: v4l2: Rename second ioctl handlers argument to 'void *priv' 2025-08-13 08:34:01 +02:00
dsbr100.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
Kconfig media: radio-wl1273: Remove 2025-08-13 08:33:19 +02:00
lm7000.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile media: radio-wl1273: Remove 2025-08-13 08:33:19 +02:00
radio-aimslab.c media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
radio-aztech.c media: update Hans Verkuil's email address 2025-09-09 15:59:02 +02:00
radio-cadet.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
radio-gemtek.c media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
radio-isa.c media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
radio-isa.h media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
radio-keene.c media: radio-keene: fix memory leak in error path 2026-03-04 07:21:00 -05:00
radio-ma901.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-maxiradio.c media: v4l: ioctl: Set bus_info in v4l_querycap() 2022-04-24 08:07:08 +01:00
radio-miropcm20.c media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
radio-mr800.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-raremono.c media: update Hans Verkuil's email address 2025-09-09 15:59:02 +02:00
radio-rtrack2.c media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
radio-sf16fmi.c media: media/radio: make array probe_ports static const 2022-01-23 21:18:43 +01:00
radio-sf16fmr2.c isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
radio-shark.c media: radio-shark: Add endpoint checks 2023-04-20 11:43:22 +02:00
radio-shark2.c media: radio-shark2: Avoid led_names truncations 2024-04-08 13:48:19 +02:00
radio-si476x.c media: Switch back to struct platform_driver::remove() 2024-10-12 16:28:25 +02:00
radio-tea5764.c media: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-08-09 07:56:37 +02:00
radio-tea5777.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-tea5777.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
radio-terratec.c media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
radio-timb.c media: Switch back to struct platform_driver::remove() 2024-10-12 16:28:25 +02:00
radio-trust.c media: remove include stdarg.h from some drivers 2019-08-26 14:01:44 -03:00
radio-typhoon.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
radio-zoltrix.c media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
saa7706h.c media: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-08-09 07:56:37 +02:00
tea575x.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tef6862.c media: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-08-09 07:56:37 +02:00