diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2010-11-19 13:41:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-30 20:25:46 -0500 |
commit | a4fb0b228e284107b9bdf44769bbdc80efd660e1 (patch) | |
tree | f05f07477404949287fe03e41632f0e4d733f483 /drivers/serial/ifx6x60.c | |
parent | badb9533abbbba70df099765afe4ae432b442430 (diff) |
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: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/ifx6x60.c')
-rw-r--r-- | drivers/serial/ifx6x60.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/ifx6x60.c b/drivers/serial/ifx6x60.c index 3f8d5ee90a1b..ab93763862d5 100644 --- a/drivers/serial/ifx6x60.c +++ b/drivers/serial/ifx6x60.c | |||
@@ -1384,6 +1384,7 @@ static int __init ifx_spi_init(void) | |||
1384 | if (result) { | 1384 | if (result) { |
1385 | pr_err("%s: tty_register_driver failed(%d)", | 1385 | pr_err("%s: tty_register_driver failed(%d)", |
1386 | DRVNAME, result); | 1386 | DRVNAME, result); |
1387 | put_tty_driver(tty_drv); | ||
1387 | return result; | 1388 | return result; |
1388 | } | 1389 | } |
1389 | 1390 | ||