Commit 4c02261b authored by Zhipeng Lu's avatar Zhipeng Lu Committed by Zhang Changzhong
Browse files

media: ttpci: fix two memleaks in budget_av_attach

mainline inclusion
from mainline-v6.9-rc1
commit d0b07f712bf61e1a3cf23c87c663791c42e50837
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9L9IH
CVE: CVE-2024-27073

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0b07f712bf61e1a3cf23c87c663791c42e50837



---------------------------

When saa7146_register_device and saa7146_vv_init fails, budget_av_attach
should free the resources it allocates, like the error-handling of
ttpci_budget_init does. Besides, there are two fixme comment refers to
such deallocations.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarZhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Conflicts:
	drivers/media/pci/ttpci/budget-av.c
[commit 3e30a927 ("media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO") was not merged]
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parent b9f13a64
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment