summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/kobil_sct.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-05-15 17:53:43 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:47 -0700
commitc0f631d1948658b27349545b2cbcb4b32f010c7a (patch)
tree01a88964ccbeb2c551da1e9b1ffc3b97bf279a9f /drivers/usb/serial/kobil_sct.c
parent86234d4975ce084d14711283a3bfc69305f97602 (diff)
USB: kobil: fix memory leak
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>
Diffstat (limited to 'drivers/usb/serial/kobil_sct.c')
-rw-r--r--drivers/usb/serial/kobil_sct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index c113a2a0e10c..bd5bd8589e04 100644
--- 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;
}