Commit 9d4bb6c9 authored by Rui Miguel Silva's avatar Rui Miguel Silva Committed by Greg Kroah-Hartman

greybus: uart: fix double free of tty port

When inserting and removing a module with a UART protocol defined a
double free of the tty_port would happen and that would generate a lot
of kernel oops in different places related to memory corruption.
Signed-off-by: default avatarRui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 9d15134d
......@@ -701,7 +701,6 @@ static void gb_uart_connection_exit(struct gb_connection *connection)
/* FIXME - free transmit / receive buffers */
tty_port_put(&gb_tty->port);
tty_port_destroy(&gb_tty->port);
kfree(gb_tty->buffer);
kfree(gb_tty);
......
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