提交 00cedfa6 编写于 作者: F Florin Malita 提交者: Pierre Ossman

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: NPierre Ossman <drzeus@drzeus.cx>
上级 e6d5a11d
...@@ -213,7 +213,8 @@ static int mmc_read_ext_csd(struct mmc_card *card) ...@@ -213,7 +213,8 @@ static int mmc_read_ext_csd(struct mmc_card *card)
printk(KERN_ERR "%s: unrecognised EXT_CSD structure " printk(KERN_ERR "%s: unrecognised EXT_CSD structure "
"version %d\n", mmc_hostname(card->host), "version %d\n", mmc_hostname(card->host),
ext_csd_struct); ext_csd_struct);
return -EINVAL; err = -EINVAL;
goto out;
} }
if (ext_csd_struct >= 2) { if (ext_csd_struct >= 2) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册