diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2024-01-31 13:00:33 +0100 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-26 18:19:49 -0400 |
commit | d164ddc21e986dd9ad614b4b01746e5457aeb24f (patch) | |
tree | 5f54d01c03652ef11c7de5c7fd498cfb4a169851 /drivers | |
parent | 8b50270c4aa0f2c0264b043bc985c620518996a2 (diff) | |
download | linux-stable-d164ddc21e986dd9ad614b4b01746e5457aeb24f.tar.gz linux-stable-d164ddc21e986dd9ad614b4b01746e5457aeb24f.tar.bz2 linux-stable-d164ddc21e986dd9ad614b4b01746e5457aeb24f.zip |
media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak
[ Upstream commit 4797a3dd46f220e6d83daf54d70c5b33db6deb01 ]
Free the memory allocated in v4l2_ctrl_handler_init on release.
Fixes: a8ef0488cc59 ("media: imx: add csc/scaler mem2mem device")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/imx/imx-media-csc-scaler.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c b/drivers/staging/media/imx/imx-media-csc-scaler.c index 1fd39a2fca98..95cca281e8a3 100644 --- a/drivers/staging/media/imx/imx-media-csc-scaler.c +++ b/drivers/staging/media/imx/imx-media-csc-scaler.c @@ -803,6 +803,7 @@ static int ipu_csc_scaler_release(struct file *file) dev_dbg(priv->dev, "Releasing instance %p\n", ctx); + v4l2_ctrl_handler_free(&ctx->ctrl_hdlr); v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); v4l2_fh_del(&ctx->fh); v4l2_fh_exit(&ctx->fh); |