From: Olivier Sobrie Date: Fri, 30 Jan 2015 12:21:55 +0000 (+0100) Subject: hso: fix memory leak when device disconnects X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=295fc56f465ee8e013b2889e42094da9b2bd7125;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 191c1fac08b6..d855cead3978 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); }