projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.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
|
blame
|
history
diff --git
a/drivers/usb/serial/ark3116.c
b/drivers/usb/serial/ark3116.c
index ddfee918000dc5fd8b6b997d75a81625472821c4..fe2bfd67ba8e4717ef3b96657902663dbeedd22c 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;
}