linux/drivers/staging/media
Haoxiang Li c842a6a8ac 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:26:08 +02:00
..
atomisp media: atomisp: Add check for rgby_data memory allocation failure 2024-12-14 19:53:24 +01:00
deprecated media: ttpci: fix two memleaks in budget_av_attach 2024-03-26 18:20:51 -04:00
imx media: imx: fix a potential memory leak in imx_media_csc_scaler_device_init() 2025-08-28 16:26:08 +02:00
ipu3 media: staging: ipu3-imgu: Set fields before media_entity_pads_init() 2024-04-03 15:19:23 +02:00
max96712 staging: media: max96712: fix kernel oops when removing module 2025-02-21 13:49:28 +01:00
meson/vdec media: meson: vdec: fix possible refcount leak in vdec_probe() 2022-09-24 08:55:43 +02:00
omap4iss media: Prefer designated initializers over memset for subdev pad ops 2023-05-24 17:32:36 +01:00
rkvdec media: rkvdec: Fix frame size enumeration 2025-06-27 11:07:08 +01:00
sunxi media: cedrus: h265: Fix configuring bitstream size 2024-03-26 18:20:49 -04:00
tegra-video staging: media: tegra-video: fix device_node use after free 2023-01-07 11:11:49 +01:00
Kconfig media: destage Hantro VPU driver 2022-08-31 10:23:50 +02:00
Makefile media: destage Hantro VPU driver 2022-08-31 10:23:50 +02:00