projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e3b1d8
)
USB: fix memleak in ark3116 serial driver
author
Oliver Neukum
<oliver@neukum.org>
Tue, 22 Jan 2008 13:24:56 +0000
(14:24 +0100)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 1 Feb 2008 22:35:04 +0000
(14:35 -0800)
in an error case memory already allocated must be freed again.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/ark3116.c
patch
|
blob
|
history
diff --git
a/drivers/usb/serial/ark3116.c
b/drivers/usb/serial/ark3116.c
index
ddfee91
..
fe2bfd6
100644
(file)
--- a/
drivers/usb/serial/ark3116.c
+++ b/
drivers/usb/serial/ark3116.c
@@
-151,8
+151,10
@@
static int ark3116_attach(struct usb_serial *serial)
return 0;
cleanup:
- for (--i; i >= 0; --i)
+ for (--i; i >= 0; --i) {
+ kfree(usb_get_serial_port_data(serial->port[i]));
usb_set_serial_port_data(serial->port[i], NULL);
+ }
return -ENOMEM;
}