From: Darren Jenkins <darrenrjenkins@gmail.com>
To: Kernel Janitors <kernel-janitors@vger.kernel.org>,
Len Brown <lenb@kernel.org>,
linux ACPI <linux-acpi@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
astarikovskiy@suse.de
Subject: [PATCH] drivers/acpi/ec.c fix a small memory leak
Date: Tue, 02 Feb 2010 23:12:10 +1100 [thread overview]
Message-ID: <1265112730.4804.8.camel@ICE-BOX> (raw)
Plug a very small leak in acpi_ec_ecdt_probe()
Coverity CID: 13319
Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
diff --git drivers/acpi/ec.c drivers/acpi/ec.c
index d6471bb..13061dc 100644
--- drivers/acpi/ec.c
+++ drivers/acpi/ec.c
@@ -1009,8 +1009,10 @@ int __init acpi_ec_ecdt_probe(void)
/* fall through */
}
- if (EC_FLAGS_SKIP_DSDT_SCAN)
+ if (EC_FLAGS_SKIP_DSDT_SCAN) {
+ kfree(saved_ec);
return -ENODEV;
+ }
/* This workaround is needed only on some broken machines,
* which require early EC, but fail to provide ECDT */
next reply other threads:[~2010-02-02 12:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 12:12 Darren Jenkins [this message]
2010-02-02 15:35 ` [PATCH] drivers/acpi/ec.c fix a small memory leak Alexey Starikovskiy
2010-02-03 6:12 ` Dan Carpenter
2010-02-03 11:06 ` Bernd Petrovitsch
2010-02-03 11:33 ` Darren Jenkins
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=1265112730.4804.8.camel@ICE-BOX \
--to=darrenrjenkins@gmail.com \
--cc=astarikovskiy@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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