media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
stable inclusion from stable-v5.10.183 commit eb37fef417a246fe54530901a3ea9c0abc914fc2 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/?id=eb37fef417a246fe54530901a3ea9c0abc914fc2 -------------------------------- [ 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:Hyunwoo Kim <imv4bel@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
ChenXiaoSong <chenxiaosong2@huawei.com> (cherry picked from commit 3830cc59)
Loading
Please sign in to comment