Messages in this thread Patch in this message | | | Date | Thu, 01 Jul 2010 10:30:53 -0700 | From | Greg KH <> | Subject | [patch 027/149] USB: kobil: fix memory leak |
| |
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johan Hovold <jhovold@gmail.com>
commit c0f631d1948658b27349545b2cbcb4b32f010c7a upstream.
An urb transfer buffer is allocated at every open but was never freed.
This driver is a bit of a mess...
Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- drivers/usb/serial/kobil_sct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -345,7 +345,8 @@ static void kobil_close(struct usb_seria /* 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; }
| |