diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-10-15 16:43:50 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-10-15 16:43:50 -0200 |
commit | dca174edc075d7e9ef3a746d6d0e8240da165038 (patch) | |
tree | 22b926578d19b2fead516ac804440f61d6fee046 | |
parent | bdb643e51051690d5d0d98f979a59a02593241bd (diff) | |
download | mediapointer-dvb-s2-dca174edc075d7e9ef3a746d6d0e8240da165038.tar.gz mediapointer-dvb-s2-dca174edc075d7e9ef3a746d6d0e8240da165038.tar.bz2 |
tm6000: Fix a memory leak at tm6000-video
From: Mauro Carvalho Chehab <mchehab@redhat.com>
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-- | linux/drivers/staging/tm6000/tm6000-video.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |