Daniel Niv bec3831f51 media: media/saa7164: fix saa7164_encoder_register() memory leak bugs
[ Upstream commit c759b2970c561e3b56aa030deb13db104262adfe ]

Add a fix for the memory leak bugs that can occur when the
saa7164_encoder_register() function fails.
The function allocates memory without explicitly freeing
it when errors occur.
Add a better error handling that deallocate the unused buffers before the
function exits during a fail.

Signed-off-by: Daniel Niv <danielniv3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11 14:04:09 +02:00
..
2019-08-26 14:08:50 -03:00
2019-05-28 11:21:51 -04:00
2019-08-26 14:08:50 -03:00