Commit 6dbb9a23 authored by Hyunwoo Kim's avatar Hyunwoo Kim Committed by ChenXiaoSong
Browse files

media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()

stable inclusion
from stable-v4.19.285
commit 3e5af0745a4702ab0df2f880bfe0431eb30f9164
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I635HP
CVE: CVE-2022-45887

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=3e5af0745a4702ab0df2f880bfe0431eb30f9164

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

[ Upstream commit 517a2813 ]

Since dvb_frontend_detach() is not called in ttusb_dec_exit_dvb(),
which is called when the device is disconnected, dvb_frontend_free()
is not finally called.

This causes a memory leak just by repeatedly plugging and
unplugging the device.

Fix this issue by adding dvb_frontend_detach() to ttusb_dec_exit_dvb().

Link: https://lore.kernel.org/linux-media/20221117045925.14297-5-imv4bel@gmail.com


Signed-off-by: default avatarHyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChenXiaoSong <chenxiaosong2@huawei.com>
parent bde0cdaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment