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>
This commit is contained in:
parent
86234d4975
commit
c0f631d194
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue