projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86234d4
)
USB: kobil: fix memory leak
author
Johan Hovold
<jhovold@gmail.com>
Sat, 15 May 2010 15:53:43 +0000
(17:53 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 20 May 2010 20:21:47 +0000
(13:21 -0700)
An urb transfer buffer is allocated at every open but was never freed.
This driver is a bit of a mess...
Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/kobil_sct.c
patch
|
blob
|
history
diff --git
a/drivers/usb/serial/kobil_sct.c
b/drivers/usb/serial/kobil_sct.c
index c113a2a0e10c529e198dcd9e6b7de868e27cddba..bd5bd8589e04cc300f43674079afa3f54715ee35 100644
(file)
--- a/
drivers/usb/serial/kobil_sct.c
+++ b/
drivers/usb/serial/kobil_sct.c
@@
-345,7
+345,8
@@
static void kobil_close(struct usb_serial_port *port)
/* FIXME: Add rts/dtr methods */
if (port->write_urb) {
- usb_kill_urb(port->write_urb);
+ usb_poison_urb(port->write_urb);
+ kfree(port->write_urb->transfer_buffer);
usb_free_urb(port->write_urb);
port->write_urb = NULL;
}