media: tw686x: Fix memory leak in tw686x_video_init
stable inclusion from stable-v5.10.137 commit 611f86965df013d6021e6cd0d155b1734ad2cf21 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=611f86965df013d6021e6cd0d155b1734ad2cf21 -------------------------------- [ Upstream commit e0b212ec ] video_device_alloc() allocates memory for vdev, when video_register_device() fails, it doesn't release the memory and leads to memory leak, call video_device_release() to fix this. Fixes: 704a84cc ("[media] media: Support Intersil/Techwell TW686x-based video capture cards") Signed-off-by:Miaoqian Lin <linmq006@gmail.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com>
Loading
Please sign in to comment