Archived
14
0
Fork 0

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:
Mauro Carvalho Chehab 2007-10-15 15:43:50 -03:00
parent 2b971af238
commit c1a1641450

View file

@ -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;