* [PATCH v2] fs_enet: Fix a memory leak in fs_enet_mdio_probe
@ 2008-05-02 18:42 Scott Wood
2008-05-06 16:23 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Scott Wood @ 2008-05-02 18:42 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, akpm, Daniel Marjamki
There are more memory leaks in the !PPC_CPM_NEW_BINDING case, but that code
will disappear soon along with arch/ppc.
Reported by Daniel Marjamki <danielm77@spray.se> at
http://bugzilla.kernel.org/show_bug.cgi?id=10591
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
drivers/net/fs_enet/mii-fec.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index ba75efc..f0014cf 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -194,7 +194,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
ret = of_address_to_resource(ofdev->node, 0, &res);
if (ret)
- return ret;
+ goto out_res;
snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
@@ -236,6 +236,7 @@ out_free_irqs:
kfree(new_bus->irq);
out_unmap_regs:
iounmap(fec->fecp);
+out_res:
out_fec:
kfree(fec);
out_mii:
--
1.5.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-06 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02 18:42 [PATCH v2] fs_enet: Fix a memory leak in fs_enet_mdio_probe Scott Wood
2008-05-06 16:23 ` Jeff Garzik
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).