From: Florin Malita Date: Sat, 13 Oct 2007 16:27:20 +0000 (-0400) Subject: mmc: possible leak in mmc_read_ext_csd X-Git-Tag: v2.6.24-rc1~475^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=00cedfa67b3ab1588e2665eabd9843a3d8dd1dfc;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 65fe28860f5..68c0e3b2f0e 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) {