Skip to content

Commit

Permalink
hso: fix memory leak when device disconnects
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Olivier Sobrie authored and David S. Miller committed Feb 1, 2015
1 parent 29bd3bc commit 295fc56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 295fc56

Please sign in to comment.