]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: vivid: dev->bitmap_cap wasn't freed in all cases
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 13 Oct 2022 14:18:46 +0000 (15:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:49:18 +0000 (23:49 +0900)
commite1b5b061987d56d7b64da962fec3be4ae7e78300
treed0b2b89a5416cf3339af2aae04804e3cf51a498c
parent943bffb230b9b615394fa1d068ab338b4137efdc
media: vivid: dev->bitmap_cap wasn't freed in all cases

[ Upstream commit 1f65ea411cc7b6ff128d82a3493d7b5648054e6f ]

Whenever the compose width/height values change, the dev->bitmap_cap
vmalloc'ed array must be freed and dev->bitmap_cap set to NULL.

This was done in some places, but not all. This is only an issue if
overlay support is enabled and the bitmap clipping is used.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: ef834f7836ec ([media] vivid: add the video capture and output parts)
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/vivid/vivid-vid-cap.c