Loading
media: ttpci: fix two memleaks in budget_av_attach
stable inclusion from stable-v5.10.214 commit 910363473e4bf97da3c350e08d915546dd6cc30b 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/stable/linux.git/commit/?id=910363473e4bf97da3c350e08d915546dd6cc30b -------------------------------- [ 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: 1da177e4 ("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> Signed-off-by:
Zhang Changzhong <zhangchangzhong@huawei.com> (cherry picked from commit 806c89e7)