Skip to content

Commit

Permalink
V4L/DVB (9282): Properly iterate the urbs when destroying them.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Erik Andrén authored and Mauro Carvalho Chehab committed Oct 17, 2008
1 parent e2c9749 commit 4473281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static void destroy_urbs(struct gspca_dev *gspca_dev)
unsigned int i;

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

0 comments on commit 4473281

Please sign in to comment.