mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-09 22:24:04 +08:00
V4L/DVB (12805): tm6000: Fix a memory leak at tm6000-video
if a transfer buffer allocation fails, the last allocated urb is leaked (it hasn't been stored in dev->urb[] yet so tm6000_uninit_isoc misses it). The patch also includes a small typo fix. Thanks to Florin Malita <fmalita@gmail.com> for pointing this. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
2b971af238
commit
c1a1641450
@ -672,6 +672,7 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev,
|
||||
if (!urb) {
|
||||
tm6000_err("cannot alloc isoc_ctl.urb %i\n", i);
|
||||
tm6000_uninit_isoc(dev);
|
||||
usb_free_urb(urb);
|
||||
return -ENOMEM;
|
||||
}
|
||||
dev->isoc_ctl.urb[i] = urb;
|
||||
|
Loading…
Reference in New Issue
Block a user