Skip to content

Commit

Permalink
V4L/DVB (8887): gspca: fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Douglas Schilling Landgraf authored and Mauro Carvalho Chehab committed Sep 29, 2008
1 parent dc2b80c commit adf8c02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,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,
Expand Down

0 comments on commit adf8c02

Please sign in to comment.