From dca174edc075d7e9ef3a746d6d0e8240da165038 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 15 Oct 2007 16:43:50 -0200 Subject: tm6000: Fix a memory leak at tm6000-video From: Mauro Carvalho Chehab 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 for pointing this. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/staging/tm6000/tm6000-video.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/drivers/staging/tm6000/tm6000-video.c b/linux/drivers/staging/tm6000/tm6000-video.c index f0ec2a884..0fb0acb57 100644 --- a/linux/drivers/staging/tm6000/tm6000-video.c +++ b/linux/drivers/staging/tm6000/tm6000-video.c @@ -696,6 +696,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; -- cgit v1.2.3