* [PATCH] mmc: possible leak in mmc_read_ext_csd
@ 2007-10-13 16:27 Florin Malita
2007-10-17 19:32 ` Pierre Ossman
0 siblings, 1 reply; 2+ messages in thread
From: Florin Malita @ 2007-10-13 16:27 UTC (permalink / raw)
To: drzeus-mmc; +Cc: Linux Kernel Mailing List
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) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-17 19:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-13 16:27 [PATCH] mmc: possible leak in mmc_read_ext_csd Florin Malita
2007-10-17 19:32 ` Pierre Ossman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox