All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: possible leak in mmc_read_ext_csd
@ 2007-10-13 16:27 Florin Malita
  2007-10-17 19:32 ` Pierre Ossman
  0 siblings, 1 reply; 2+ messages in thread
From: Florin Malita @ 2007-10-13 16:27 UTC (permalink / raw)
  To: drzeus-mmc; +Cc: Linux Kernel Mailing List

The exception path associated with an invalid ext_csd_struct returns 
without freeing ext_csd.

Coverity CID 1909.

Signed-off-by: Florin Malita
---

 drivers/mmc/core/mmc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 65fe288..68c0e3b 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) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: possible leak in mmc_read_ext_csd
  2007-10-13 16:27 [PATCH] mmc: possible leak in mmc_read_ext_csd Florin Malita
@ 2007-10-17 19:32 ` Pierre Ossman
  0 siblings, 0 replies; 2+ messages in thread
From: Pierre Ossman @ 2007-10-17 19:32 UTC (permalink / raw)
  To: Florin Malita; +Cc: Linux Kernel Mailing List

On Sat, 13 Oct 2007 12:27:20 -0400
Florin Malita <fmalita@gmail.com> wrote:

> The exception path associated with an invalid ext_csd_struct returns 
> without freeing ext_csd.
> 
> Coverity CID 1909.
> 
> Signed-off-by: Florin Malita

Quite right. Applied.

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-17 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-13 16:27 [PATCH] mmc: possible leak in mmc_read_ext_csd Florin Malita
2007-10-17 19:32 ` Pierre Ossman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.