Skip to content
Commit 0ae10a7d authored by Muhammad Usama Anjum's avatar Muhammad Usama Anjum Committed by Mauro Carvalho Chehab
Browse files

media: em28xx: fix memory leak



If some error occurs, URB buffers should also be freed. If they aren't
freed with the dvb here, the em28xx_dvb_fini call doesn't frees the URB
buffers as dvb is set to NULL. The function in which error occurs should
do all the cleanup for the allocations it had done.

Tested the patch with the reproducer provided by syzbot. This patch
fixes the memleak.

Reported-by: default avatar <syzbot+889397c820fa56adf25d@syzkaller.appspotmail.com>
Signed-off-by: default avatarMuhammad Usama Anjum <musamaanjum@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 73c9a3f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment