diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-04 10:20:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-04 10:20:20 -0400 |
commit | c53c922aa46b63d70cca443e61994fb67c692769 (patch) | |
tree | 4252c15569b58ca045a0e3062b2d5717bdbdb3f1 /linux/drivers | |
parent | 627d49e4be1d62e3a0f37790f77640d47332ca3f (diff) | |
download | mediapointer-dvb-s2-c53c922aa46b63d70cca443e61994fb67c692769.tar.gz mediapointer-dvb-s2-c53c922aa46b63d70cca443e61994fb67c692769.tar.bz2 |
em28xx-audio: fix memory leak
From: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Free allocated memory
Priority: high
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-audio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-audio.c b/linux/drivers/media/video/em28xx/em28xx-audio.c index 904973305..14ef4da24 100644 --- a/linux/drivers/media/video/em28xx/em28xx-audio.c +++ b/linux/drivers/media/video/em28xx/em28xx-audio.c @@ -171,8 +171,14 @@ static int em28xx_init_audio_isoc(struct em28xx *dev) memset(dev->adev->transfer_buffer[i], 0x80, sb_size); urb = usb_alloc_urb(EM28XX_NUM_AUDIO_PACKETS, GFP_ATOMIC); - if (!urb) + if (!urb) { + em28xx_errdev("usb_alloc_urb failed!\n"); + for (j = 0; j < i; j++) { + usb_free_urb(dev->adev->urb[j]); + kfree(dev->adev->transfer_buffer[j]); + } return -ENOMEM; + } urb->dev = dev->udev; urb->context = dev; |