diff options
author | Johan Hovold <jhovold@gmail.com> | 2010-05-15 15:53:43 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 20:21:47 (GMT) |
commit | c0f631d1948658b27349545b2cbcb4b32f010c7a (patch) | |
tree | 01a88964ccbeb2c551da1e9b1ffc3b97bf279a9f /drivers/usb/serial/kobil_sct.c | |
parent | 86234d4975ce084d14711283a3bfc69305f97602 (diff) | |
download | linux-fsl-qoriq-c0f631d1948658b27349545b2cbcb4b32f010c7a.tar.xz |
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.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 c113a2a..bd5bd85 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; } |