Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adf8c021 authored by Douglas Schilling Landgraf's avatar Douglas Schilling Landgraf Committed by Mauro Carvalho Chehab
Browse files

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: default avatarDouglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent dc2b80c1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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,