linux/drivers/staging/media
Haoxiang Li a5c8984a5b media: imx: fix a potential memory leak in imx_media_csc_scaler_device_init()
commit fc5f8aec77 upstream.

Add video_device_release() in label 'err_m2m' to release the memory
allocated by video_device_alloc() and prevent potential memory leaks.
Remove the reduntant code in label 'err_m2m'.

Fixes: a8ef0488cc ("media: imx: add csc/scaler mem2mem device")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-08-28 16:31:00 +02:00
..
atomisp staging: media: atomisp: Fix stack buffer overflow in gmin_get_var_int() 2025-08-15 12:13:48 +02:00
av7110 media fixes for v6.12-rc7 2024-11-08 07:41:27 -10:00
deprecated/atmel staging: media: atmel: use for_each_endpoint_of_node() 2024-08-09 07:56:39 +02:00
imx media: imx: fix a potential memory leak in imx_media_csc_scaler_device_init() 2025-08-28 16:31:00 +02:00
ipu3 staging: media: ipu3: Stop streaming in inverse order of starting 2024-08-31 09:40:42 +02:00
max96712 staging: media: max96712: fix kernel oops when removing module 2025-02-08 09:58:17 +01:00
meson/vdec media: meson: vdec: hevc: Refactor vdec_hevc_start and vdec_hevc_stop 2024-08-31 09:40:43 +02:00
omap4iss media: v4l: subdev: Switch to stream-aware state functions 2023-11-23 18:57:47 +01:00
rkvdec media: rkvdec: Fix frame size enumeration 2025-06-19 15:31:34 +02:00
starfive staging: media: starfive: Add the dynamic resolution support 2024-08-25 01:42:01 +03:00
sunxi media: staging: sun6i-isp: Remove redundant printk 2024-05-03 11:07:33 +01:00
tegra-video media: staging: media: tegra-video: Use swap macro 2024-05-03 11:10:00 +01:00
Kconfig media: staging: media: starfive: camss: Add core driver 2023-11-16 12:13:25 +01:00
Makefile media: staging: media: starfive: camss: Add core driver 2023-11-16 12:13:25 +01:00