diff options
author | Johan Hovold <jhovold@gmail.com> | 2010-05-15 11:53:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:47 -0400 |
commit | c0f631d1948658b27349545b2cbcb4b32f010c7a (patch) | |
tree | 01a88964ccbeb2c551da1e9b1ffc3b97bf279a9f /drivers/usb | |
parent | 86234d4975ce084d14711283a3bfc69305f97602 (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')
-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) | |||
345 | 345 | ||
346 | /* FIXME: Add rts/dtr methods */ | 346 | /* FIXME: Add rts/dtr methods */ |
347 | if (port->write_urb) { | 347 | if (port->write_urb) { |
348 | usb_kill_urb(port->write_urb); | 348 | usb_poison_urb(port->write_urb); |
349 | kfree(port->write_urb->transfer_buffer); | ||
349 | usb_free_urb(port->write_urb); | 350 | usb_free_urb(port->write_urb); |
350 | port->write_urb = NULL; | 351 | port->write_urb = NULL; |
351 | } | 352 | } |