Commit a4fb0b22 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Greg Kroah-Hartman

serial: ifx6x60: fix memory leak

If tty_register_driver() failed then tty_driver is still alive.
Free it with put_tty_driver().
Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent badb9533
......@@ -1384,6 +1384,7 @@ static int __init ifx_spi_init(void)
if (result) {
pr_err("%s: tty_register_driver failed(%d)",
DRVNAME, result);
put_tty_driver(tty_drv);
return result;
}
......
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