Commit 1813bc4d authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Zheng Zengkai
Browse files

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: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 87c590ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment