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

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

V4L/DVB (8886): ov511: fix memory leak



Free allocated memory

Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent beeb82be
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3591,7 +3591,7 @@ static int
ov51x_init_isoc(struct usb_ov511 *ov)
{
	struct urb *urb;
	int fx, err, n, size;
	int fx, err, n, i, size;

	PDEBUG(3, "*** Initializing capture ***");

@@ -3662,6 +3662,8 @@ ov51x_init_isoc(struct usb_ov511 *ov)
		urb = usb_alloc_urb(FRAMES_PER_DESC, GFP_KERNEL);
		if (!urb) {
			err("init isoc: usb_alloc_urb ret. NULL");
			for (i = 0; i < n; i++)
				usb_free_urb(ov->sbuf[i].urb);
			return -ENOMEM;
		}
		ov->sbuf[n].urb = urb;