From: Erik Andrén Date: Mon, 13 Oct 2008 18:52:46 +0000 (-0300) Subject: V4L/DVB (9282): Properly iterate the urbs when destroying them. X-Git-Tag: v2.6.28-rc1~256^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=447328194efa74aba45c656b47a98c58487a28f6;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index c21af312ee7..277244b1fd7 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -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;