From: Florin Malita <fmalita@gmail.com>
To: drzeus-mmc@drzeus.cx
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] mmc: possible leak in mmc_read_ext_csd
Date: Sat, 13 Oct 2007 12:27:20 -0400 [thread overview]
Message-ID: <4710F1E8.6090103@gmail.com> (raw)
The exception path associated with an invalid ext_csd_struct returns
without freeing ext_csd.
Coverity CID 1909.
Signed-off-by: Florin Malita
---
drivers/mmc/core/mmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 65fe288..68c0e3b 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -213,7 +213,8 @@ static int mmc_read_ext_csd(struct mmc_card *card)
printk(KERN_ERR "%s: unrecognised EXT_CSD structure "
"version %d\n", mmc_hostname(card->host),
ext_csd_struct);
- return -EINVAL;
+ err = -EINVAL;
+ goto out;
}
if (ext_csd_struct >= 2) {
next reply other threads:[~2007-10-13 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-13 16:27 Florin Malita [this message]
2007-10-17 19:32 ` [PATCH] mmc: possible leak in mmc_read_ext_csd Pierre Ossman
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=4710F1E8.6090103@gmail.com \
--to=fmalita@gmail.com \
--cc=drzeus-mmc@drzeus.cx \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.