summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2007-10-13 18:27:20 +0200
committerPierre Ossman <drzeus@drzeus.cx>2007-10-17 21:33:46 +0200
commit00cedfa67b3ab1588e2665eabd9843a3d8dd1dfc (patch)
tree21a747cf4a9f022212e98c346062ac098476a836 /drivers/mmc
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched (diff)
downloadlinux-00cedfa67b3ab1588e2665eabd9843a3d8dd1dfc.tar.xz
linux-00cedfa67b3ab1588e2665eabd9843a3d8dd1dfc.zip
mmc: possible leak in mmc_read_ext_csd
The exception path associated with an invalid ext_csd_struct returns without freeing ext_csd. Coverity CID 1909. Signed-off-by: Florin Malita Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/mmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 65fe28860f54..68c0e3b2f0e8 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) {