mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
29bd3bc119
commit
295fc56f46
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user