Commit 295fc56f authored by Olivier Sobrie's avatar Olivier Sobrie Committed by David S. Miller

hso: fix memory leak when device disconnects

In the disconnect path, tx_buffer should freed like tx_data to avoid
a memory leak when the device disconnects.
Signed-off-by: default avatarOlivier Sobrie <olivier@sobrie.be>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 29bd3bc1
...@@ -2253,6 +2253,7 @@ static void hso_serial_common_free(struct hso_serial *serial) ...@@ -2253,6 +2253,7 @@ static void hso_serial_common_free(struct hso_serial *serial)
/* unlink and free TX URB */ /* unlink and free TX URB */
usb_free_urb(serial->tx_urb); usb_free_urb(serial->tx_urb);
kfree(serial->tx_buffer);
kfree(serial->tx_data); kfree(serial->tx_data);
tty_port_destroy(&serial->port); tty_port_destroy(&serial->port);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment