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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 17 Jun 2021 08:21:51 +0000 (10:21 +0200)
commit5d11e6aad1811ea293ee2996cec9124f7fccb661
treeef3b10b4220ac829d9c44c4e68b74d6d5b1fec8e
parent2b889a4afcacef4888ac8203a60e68004816e1fd
media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx

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>
drivers/media/platform/s5p-g2d/g2d.c