diff options
author | Olivier Sobrie <olivier@sobrie.be> | 2015-01-30 13:21:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-01 12:33:26 -0800 |
commit | 295fc56f465ee8e013b2889e42094da9b2bd7125 (patch) | |
tree | 2bbdf844e630eba53c141821938559dfce178f4d /drivers/net/usb/hso.c | |
parent | 29bd3bc1194c624ce863cab2a7da9bc1f0c3b47b (diff) | |
download | op-kernel-dev-295fc56f465ee8e013b2889e42094da9b2bd7125.zip op-kernel-dev-295fc56f465ee8e013b2889e42094da9b2bd7125.tar.gz |
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>
Diffstat (limited to 'drivers/net/usb/hso.c')
-rw-r--r-- | drivers/net/usb/hso.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 191c1fa..d855cea 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2253,6 +2253,7 @@ static void hso_serial_common_free(struct hso_serial *serial) /* unlink and free TX URB */ usb_free_urb(serial->tx_urb); + kfree(serial->tx_buffer); kfree(serial->tx_data); tty_port_destroy(&serial->port); } |