mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue