OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e7f225
)
Staging: comedi: serial2002: Fix memory leak on detach
author
Ian Abbott
<abbotti@mev.co.uk>
Wed, 19 May 2010 13:10:02 +0000
(14:10 +0100)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 17 Jun 2010 20:28:56 +0000
(13:28 -0700)
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>
drivers/staging/comedi/drivers/serial2002.c
patch
|
blob
|
history
diff --git
a/drivers/staging/comedi/drivers/serial2002.c
b/drivers/staging/comedi/drivers/serial2002.c
index
880fe89
..
6813e34
100644
(file)
--- 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);