From: Mauro Carvalho Chehab Date: Mon, 15 Oct 2007 18:43:50 +0000 (-0300) Subject: V4L/DVB (12805): tm6000: Fix a memory leak at tm6000-video X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c1a1641450e769f534df4d1217f3feec8e38ea37;p=openwrt%2Fstaging%2Fblogic.git 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 for pointing this. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 58fcf6ae6069..cdaf44806e3e 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -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;