Subject: Re: [PATCH] bfin_mac: fix memleak in mii_bus{probe|remove}

From: Denis Kirjanov <[email-masked]>
Date: Wed, 19 May 2010 09:18:15 +0400

On Tue, May 18, 2010 at 14:13 -0700, David Miller wrote:
> From: Denis Kirjanov <[email-masked]>
> Date: Tue, 18 May 2010 15:34:46 +0400
> 
> > [PATCH] bfin_mac: fix memleak in mii_bus_{probe|remove}
> > Fix memory leak with miibus->irq
> > 
> > Signed-off-by: Denis Kirjanov <[email-masked]>
> 
> I've already applied the original patch.
> 
> Therefore, it makes no sense to send a fresh complete version
> of the original patch to fix this.
> 
> You'll need to send a relative patch against the other one to
> fix the problem.
Ok, here it is. Sorry for the previous one.

[PATCH] bfin_mac: fix invalid pointer dereference in bfin_mii_bus_probe
Fix invalid memory access.

Signed-off-by: Denis Kirjanov: <[email-masked]>
---

drivers/net/bfin_mac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 7a17b8a..368f333 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -1626,8 +1626,8 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
 	return 0;
 
 out_err_mdiobus_register:
-	mdiobus_free(miibus);
 	kfree(miibus->irq);
+	mdiobus_free(miibus);
 out_err_alloc:
 	peripheral_free_list(pin_req);