mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 17:41:09 +00:00
media: tm6000: Fix memleak in tm6000_start_stream
[ Upstream commit76aaf8a967
] When usb_clear_halt() fails, dvb->bulk_urb->transfer_buffer and dvb->bulk_urb should be freed just like when usb_submit_urb() fails. Fixes:3169c9b26f
("V4L/DVB (12788): tm6000: Add initial DVB-T support") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
172e30ea38
commit
9883df7c01
1 changed files with 4 additions and 0 deletions
|
@ -141,6 +141,10 @@ static int tm6000_start_stream(struct tm6000_core *dev)
|
|||
if (ret < 0) {
|
||||
printk(KERN_ERR "tm6000: error %i in %s during pipe reset\n",
|
||||
ret, __func__);
|
||||
|
||||
kfree(dvb->bulk_urb->transfer_buffer);
|
||||
usb_free_urb(dvb->bulk_urb);
|
||||
dvb->bulk_urb = NULL;
|
||||
return ret;
|
||||
} else
|
||||
printk(KERN_ERR "tm6000: pipe reset\n");
|
||||
|
|
Loading…
Reference in a new issue