summaryrefslogtreecommitdiff
path: root/drivers/media/platform/Kconfig
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-12-14 14:54:47 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-04 15:18:00 +0300
commitce814ad4bb52bfc7c0472e6da0aa742ab88f4361 (patch)
treed33f523f5473d597d9fa55d19689abec68e2a17c /drivers/media/platform/Kconfig
parent4f20b7beca5a183139b22ed4fdfc161396452426 (diff)
downloadlinux-ce814ad4bb52bfc7c0472e6da0aa742ab88f4361.tar.xz
media: allegro: Fix use after free on error
The "channel" is added to the "dev->channels" but then if v4l2_m2m_ctx_init() fails then we free "channel" but it's still on the list so it could lead to a use after free. Let's not add it to the list until after v4l2_m2m_ctx_init() succeeds. Fixes: cc62c74749a3 ("media: allegro: add missed checks in allegro_open()") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/Kconfig')
0 files changed, 0 insertions, 0 deletions