]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:56:55 +0000 (23:56 +0900)
commitfcf45b01aef1e6ee68707a1475364e2018bd297c
treebd73b7e1ac06f9f27d36c96fe709d85b046b1383
parent7f781c61284f3f4ba8f781c4272f5a22e5bf3d73
media: vivid: dev->bitmap_cap wasn't freed in all cases

[ Upstream commit d32461e12c697b9c4ff2026b818c2c59c30f5487 ]

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: 9f111085007a ([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