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: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Erik Andrén 2008-10-13 15:52:46 -03:00 committed by Mauro Carvalho Chehab
parent e2c974919f
commit 447328194e

View file

@ -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;