]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: ttpci: fix two memleaks in budget_av_attach
authorZhipeng Lu <alexious@zju.edu.cn>
Wed, 21 Feb 2024 05:17:04 +0000 (13:17 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:53 +0000 (18:19 -0400)
commit7393c681f9aa05ffe2385e8716989565eed2fe06
tree9dd44649d27809f209fe46f3adc1b889e2587647
parentf31c1cc37411f5f7bcb266133f9a7e1b4bdf2975
media: ttpci: fix two memleaks in budget_av_attach

[ Upstream commit 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: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/ttpci/budget-av.c