linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [Patch] powerpc: Fix memory leak in axon_msi.c
@ 2009-10-13  0:29 Michael Ellerman
  2009-10-13 13:30 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2009-10-13  0:29 UTC (permalink / raw)
  To: linuxppc-dev list; +Cc: eric.sesterhenn

cppcheck found a memory leak in axon_msi, if dcr_base or dcr_len are zero,
we have already allocated msic, so we should free it in the error path.

Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
Acked-by: Michael Ellerman <michael@ellerman.id.au>

--- linux/arch/powerpc/platforms/cell/axon_msi.c.orig	2009-10-12 14:48:26.000000000 +0200
+++ linux/arch/powerpc/platforms/cell/axon_msi.c	2009-10-12 14:48:52.000000000 +0200
@@ -365,7 +365,7 @@ static int axon_msi_probe(struct of_devi
 		printk(KERN_ERR
 		       "axon_msi: couldn't parse dcr properties on %s\n",
 			dn->full_name);
-		goto out;
+		goto out_free_msic;
 	}

 	msic->dcr_host = dcr_map(dn, dcr_base, dcr_len);
	

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

* Re: [Patch] powerpc: Fix memory leak in axon_msi.c
  2009-10-13  0:29 [Patch] powerpc: Fix memory leak in axon_msi.c Michael Ellerman
@ 2009-10-13 13:30 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2009-10-13 13:30 UTC (permalink / raw)
  To: linuxppc-dev, michael; +Cc: linuxppc-dev list, eric.sesterhenn

On Tuesday 13 October 2009, Michael Ellerman wrote:
> cppcheck found a memory leak in axon_msi, if dcr_base or dcr_len are zero,
> we have already allocated msic, so we should free it in the error path.
> 
> Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
> Acked-by: Michael Ellerman <michael@ellerman.id.au>

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

end of thread, other threads:[~2009-10-13 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-13  0:29 [Patch] powerpc: Fix memory leak in axon_msi.c Michael Ellerman
2009-10-13 13:30 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).