Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00cedfa6 authored by Florin Malita's avatar Florin Malita Committed by Pierre Ossman
Browse files

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: default avatarPierre Ossman <drzeus@drzeus.cx>
parent e6d5a11d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {