summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-09-04 10:23:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-04 10:23:06 -0400
commit03197fde35cc2dc3caf86c0bb8866c8d3bf9df5d (patch)
tree84f0c3adb67d422305482c066abb36cf5317b14a /linux/drivers/media
parent3227f6d5c7386e8f58488ae8023fa844974bd9ec (diff)
downloadmediapointer-dvb-s2-03197fde35cc2dc3caf86c0bb8866c8d3bf9df5d.tar.gz
mediapointer-dvb-s2-03197fde35cc2dc3caf86c0bb8866c8d3bf9df5d.tar.bz2
gspca: fix memory leak
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Free allocated memory Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> CC: Jean-Francois Moine <moinejf@free.fr> CC: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/gspca/gspca.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c
index 194abf686..6e6e92f43 100644
--- a/linux/drivers/media/video/gspca/gspca.c
+++ b/linux/drivers/media/video/gspca/gspca.c
@@ -466,6 +466,8 @@ 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]);
return -ENOMEM;
}
urb->transfer_buffer = usb_buffer_alloc(gspca_dev->dev,