]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx
authorDillon Min <dillon.minfei@gmail.com>
Wed, 26 May 2021 15:18:32 +0000 (17:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:15:48 +0000 (16:15 +0200)
commit4980ea4797249b179a2732170e58f579d08fa5b2
tree9e8a6238f255d34d442b92016517e0c69132f2e1
parent841664338b920641a9289b75264a7f87f391baeb
media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx

[ Upstream commit 5d11e6aad1811ea293ee2996cec9124f7fccb661 ]

The m2m_ctx resources was allocated by v4l2_m2m_ctx_init() in g2d_open()
should be freed from g2d_release() when it's not used.

Fix it

Fixes: 918847341af0 ("[media] v4l: add G2D driver for s5p device family")
Signed-off-by: Dillon Min <dillon.minfei@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/s5p-g2d/g2d.c