提交 a4fb0b22 编写于 作者: V Vasiliy Kulikov 提交者: 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: NVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册