Skip to content

Commit

Permalink
mmc: possible leak in mmc_read_ext_csd
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florin Malita authored and Pierre Ossman committed Oct 17, 2007
1 parent e6d5a11 commit 00cedfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 00cedfa

Please sign in to comment.