From: Vasiliy Kulikov <segoon@openwall.com>
To: kernel-janitors@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Alan Cox <alan@linux.intel.com>,
Russ Gorby <richardx.r.gorby@intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] serial: ifx6x60: fix memory leak
Date: Fri, 19 Nov 2010 21:41:45 +0300 [thread overview]
Message-ID: <1290192105-11494-1-git-send-email-segoon@openwall.com> (raw)
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
reply other threads:[~2010-11-19 18:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290192105-11494-1-git-send-email-segoon@openwall.com \
--to=segoon@openwall.com \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richardx.r.gorby@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®