summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov511.c
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-09-04 16:21:58 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-29 13:26:16 +0200
commitdc2b80c191a67de8191f6323d532132fb257e402 (patch)
tree159f3e6e202361aeff9754d74d65d0cc7a31a458 /drivers/media/video/ov511.c
parentV4L/DVB (8885): cpia2_usb: fix memory leak (diff)
downloadlinux-dc2b80c191a67de8191f6323d532132fb257e402.tar.xz
linux-dc2b80c191a67de8191f6323d532132fb257e402.zip
V4L/DVB (8886): ov511: fix memory leak
Free allocated memory Cc: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov511.c')
-rw-r--r--drivers/media/video/ov511.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index 3d3c48db45d9..2576ded2b9c5 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -3591,7 +3591,7 @@ static int
ov51x_init_isoc(struct usb_ov511 *ov)
{
struct urb *urb;
- int fx, err, n, size;
+ int fx, err, n, i, size;
PDEBUG(3, "*** Initializing capture ***");
@@ -3662,6 +3662,8 @@ ov51x_init_isoc(struct usb_ov511 *ov)
urb = usb_alloc_urb(FRAMES_PER_DESC, GFP_KERNEL);
if (!urb) {
err("init isoc: usb_alloc_urb ret. NULL");
+ for (i = 0; i < n; i++)
+ usb_free_urb(ov->sbuf[i].urb);
return -ENOMEM;
}
ov->sbuf[n].urb = urb;