summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2008-10-13 20:52:46 +0200
committerErik Andrén <erik.andren@gmail.com>2008-10-13 20:52:46 +0200
commit1cd0b861c6cca9a405b3ecc888376ddccef33d1e (patch)
treee73513b30e0dcd2a735de23cc51cb12a4b6e8a37 /linux/drivers/media/video/gspca
parentc04e90e2d38493e6c092095cc2441365dd3973af (diff)
downloadmediapointer-dvb-s2-1cd0b861c6cca9a405b3ecc888376ddccef33d1e.tar.gz
mediapointer-dvb-s2-1cd0b861c6cca9a405b3ecc888376ddccef33d1e.tar.bz2
Properly iterate the urbs when destroying them.
From: Erik Andrén <erik.andren@gmail.com> Properly iterate the allocated when freeing the urbs, this fixes a memory leak Priority: normal Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r--linux/drivers/media/video/gspca/gspca.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c
index c2ad862b6..1dac9d428 100644
--- a/linux/drivers/media/video/gspca/gspca.c
+++ b/linux/drivers/media/video/gspca/gspca.c
@@ -413,7 +413,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;