From: Michael Ellerman <michael@ellerman.id.au>
To: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Cc: eric.sesterhenn@lsexperts.de
Subject: [Patch] powerpc: Fix memory leak in axon_msi.c
Date: Tue, 13 Oct 2009 11:29:40 +1100 [thread overview]
Message-ID: <1255393780.9570.3.camel@concordia> (raw)
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);
next reply other threads:[~2009-10-13 0:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 0:29 Michael Ellerman [this message]
2009-10-13 13:30 ` [Patch] powerpc: Fix memory leak in axon_msi.c Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1255393780.9570.3.camel@concordia \
--to=michael@ellerman.id.au \
--cc=eric.sesterhenn@lsexperts.de \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox