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

Commit 44732819 authored by Erik Andrén's avatar Erik Andrén Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (9282): Properly iterate the urbs when destroying them.



Properly iterate the allocated when freeing the urbs, this fixes a memory leak

Signed-off-by: default avatarErik Andrén <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e2c97491
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -403,7 +403,7 @@ static void destroy_urbs(struct gspca_dev *gspca_dev)
	unsigned int i;
	unsigned int i;


	PDEBUG(D_STREAM, "kill transfer");
	PDEBUG(D_STREAM, "kill transfer");
	for (i = 0; i < MAX_NURBS; ++i) {
	for (i = 0; i < MAX_NURBS; i++) {
		urb = gspca_dev->urb[i];
		urb = gspca_dev->urb[i];
		if (urb == NULL)
		if (urb == NULL)
			break;
			break;