]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 28 Nov 2022 14:18:16 +0000 (15:18 +0100)
commita9beb10c0ecdc2fbeebddad9cb01fc942a7d73bd
tree9dea4a64eb088cd657566403560d678eed2fcdd2
parent1ea3967ad53ac92f68537faf7c8583bd0dc4c84f
media: vivid: dev->bitmap_cap wasn't freed in all cases

BugLink: https://bugs.launchpad.net/bugs/1997981
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/media/test-drivers/vivid/vivid-vid-cap.c