diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-10-15 15:43:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-18 00:39:50 -0300 |
commit | c1a1641450e769f534df4d1217f3feec8e38ea37 (patch) | |
tree | 858d1cf28722050d48979656703760869c71e5fa | |
parent | 2b971af2384a11db0dbdb82e41fd9577ffaea46f (diff) | |
download | op-kernel-dev-c1a1641450e769f534df4d1217f3feec8e38ea37.zip op-kernel-dev-c1a1641450e769f534df4d1217f3feec8e38ea37.tar.gz |
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>
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 58fcf6a..cdaf448 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; |