diff mbox

bfin_mac: fix memleak in mii_bus{probe|remove}

Message ID 20100519051814.GA4493@coldcone
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Denis Kirjanov May 19, 2010, 5:18 a.m. UTC
On Tue, May 18, 2010 at 14:13 -0700, David Miller wrote:
> From: Denis Kirjanov <kirjanov@gmail.com>
> 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 <dkirjanov@kernel.org>
> 
> 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: <dkirjanov@kernel.org>
---

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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);