* [PATCH] serial: ifx6x60: fix memory leak
@ 2010-11-19 18:41 Vasiliy Kulikov
0 siblings, 0 replies; only message in thread
From: Vasiliy Kulikov @ 2010-11-19 18:41 UTC (permalink / raw)
To: kernel-janitors; +Cc: Greg Kroah-Hartman, Alan Cox, Russ Gorby, linux-kernel
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>
---
Compile tested only.
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 3f8d5ee..ab93763 100644
--- a/drivers/serial/ifx6x60.c
+++ b/drivers/serial/ifx6x60.c
@@ -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;
}
--
1.7.0.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-19 18:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19 18:41 [PATCH] serial: ifx6x60: fix memory leak Vasiliy Kulikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®