diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2010-05-19 14:10:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-17 13:28:56 -0700 |
commit | fa3b5d9ab0487f58b45d55a37070aa0d417f59d5 (patch) | |
tree | 5bad2426172b6d7075b38f06129128aa7e90c1ad /drivers/staging/comedi | |
parent | 9e7f2256883c954691e5d395d471e0f125f6b30b (diff) |
Staging: comedi: serial2002: Fix memory leak on detach
The comedi device 'detach' method for the serial2002 driver has an
off-by-one error in its loop for freeing data belonging to its
subdevices. Fix it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/serial2002.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index 880fe89e866f..6813e3465f6e 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -903,7 +903,7 @@ static int serial2002_detach(struct comedi_device *dev) int i; printk("comedi%d: serial2002: remove\n", dev->minor); - for (i = 0; i < 4; i++) { + for (i = 0; i < 5; i++) { s = &dev->subdevices[i]; if (s->maxdata_list) { kfree(s->maxdata_list); |