diff options
author | Johan Hovold <jhovold@gmail.com> | 2010-05-15 17:53:43 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 22:21:47 +0200 |
commit | c0f631d1948658b27349545b2cbcb4b32f010c7a (patch) | |
tree | 01a88964ccbeb2c551da1e9b1ffc3b97bf279a9f | |
parent | USB: option.c: OLIVETTI OLICARD100 support (diff) | |
download | linux-c0f631d1948658b27349545b2cbcb4b32f010c7a.tar.xz linux-c0f631d1948658b27349545b2cbcb4b32f010c7a.zip |
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>
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 3 |
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; } |