diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-09-05 17:49:54 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-09-05 17:49:54 +0200 |
commit | 61422db9ef77627adb9df73e0960fac3d78641d4 (patch) | |
tree | e39f99ec700fa285a470473f07bec68e18584d85 | |
parent | 5f2d82cefe0ce930f3146875c88b993695c7e03a (diff) | |
download | mediapointer-dvb-s2-61422db9ef77627adb9df73e0960fac3d78641d4.tar.gz mediapointer-dvb-s2-61422db9ef77627adb9df73e0960fac3d78641d4.tar.bz2 |
gspca: Bad fix of leak memory (changeset 43d2ead315b1).
From: Jean-Francois Moine <moinejf@free.fr>
Priority: high
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-rw-r--r-- | linux/drivers/media/video/gspca/gspca.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index 122644224..1fe45b55b 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -524,8 +524,7 @@ static int create_urbs(struct gspca_dev *gspca_dev, urb = usb_alloc_urb(npkt, GFP_KERNEL); if (!urb) { err("usb_alloc_urb failed"); - for (i = 0; i < n; i++) - usb_free_urb(gspca_dev->urb[i]); + destroy_urbs(gspca_dev); return -ENOMEM; } urb->transfer_buffer = usb_buffer_alloc(gspca_dev->dev, @@ -535,8 +534,8 @@ static int create_urbs(struct gspca_dev *gspca_dev, if (urb->transfer_buffer == NULL) { usb_free_urb(urb); - destroy_urbs(gspca_dev); err("usb_buffer_urb failed"); + destroy_urbs(gspca_dev); return -ENOMEM; } gspca_dev->urb[n] = urb; |