aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@linuxtv.org>2008-09-04 10:23:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-29 07:26:24 -0400
commitadf8c021d527b9c0247070513a8fa8cfd50668ed (patch)
treeccadb64748811cf2418f1d63b32de9a05c5bc67a
parentdc2b80c191a67de8191f6323d532132fb257e402 (diff)
V4L/DVB (8887): gspca: fix memory leak
Free allocated memory Cc: Jean-Francois Moine <moinejf@free.fr> Cc: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/gspca.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 7be69284da03..ed8935da58e0 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -459,6 +459,8 @@ static int create_urbs(struct gspca_dev *gspca_dev,
459 urb = usb_alloc_urb(npkt, GFP_KERNEL); 459 urb = usb_alloc_urb(npkt, GFP_KERNEL);
460 if (!urb) { 460 if (!urb) {
461 err("usb_alloc_urb failed"); 461 err("usb_alloc_urb failed");
462 for (i = 0; i < n; i++)
463 usb_free_urb(gspca_dev->urb[i]);
462 return -ENOMEM; 464 return -ENOMEM;
463 } 465 }
464 urb->transfer_buffer = usb_buffer_alloc(gspca_dev->dev, 466 urb->transfer_buffer = usb_buffer_alloc(gspca_dev->dev,