Skip to content
Commit c759b297 authored by Daniel Niv's avatar Daniel Niv Committed by Mauro Carvalho Chehab
Browse files

media: media/saa7164: fix saa7164_encoder_register() memory leak bugs



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: default avatarDaniel Niv <danielniv3@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent aa966274
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment