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

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
...@@ -403,7 +403,7 @@ static void destroy_urbs(struct gspca_dev *gspca_dev) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment