Skip to content
Commit 8c8af41d authored by Lin Yi's avatar Lin Yi Committed by Greg Kroah-Hartman
Browse files

tty: tty_io: fix driver refcount imbalance on error path



tty_lookup_driver take a reference to the struct tty_driver, but forget
to release it on the error path, lead to a memory leak.
add a tty_driver_kref_put before error return.

Signed-off-by: default avatarLin Yi <teroincn@163.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e309c6c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment