projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beeb82b
)
V4L/DVB (8886): ov511: fix memory leak
author
Douglas Schilling Landgraf
<
[email protected]
>
Thu, 4 Sep 2008 14:21:58 +0000
(11:21 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Mon, 29 Sep 2008 11:26:16 +0000
(08:26 -0300)
Free allocated memory
Cc: Luca Risolia <
[email protected]
>
Signed-off-by: Douglas Schilling Landgraf <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/video/ov511.c
patch
|
blob
|
history
diff --git
a/drivers/media/video/ov511.c
b/drivers/media/video/ov511.c
index 3d3c48db45d958c4813e8dc2c0ea850a356b796a..2576ded2b9c57498da14af8f82a37cc1fe98c8b3 100644
(file)
--- 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;