diff options
author | Douglas Schilling Landgraf <dougsland@linuxtv.org> | 2008-09-04 16:23:06 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-29 13:26:24 +0200 |
commit | adf8c021d527b9c0247070513a8fa8cfd50668ed (patch) | |
tree | ccadb64748811cf2418f1d63b32de9a05c5bc67a | |
parent | V4L/DVB (8886): ov511: fix memory leak (diff) | |
download | linux-adf8c021d527b9c0247070513a8fa8cfd50668ed.tar.xz linux-adf8c021d527b9c0247070513a8fa8cfd50668ed.zip |
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.c | 2 |
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, 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, |