From: Denis Kirjanov Date: Tue, 18 May 2010 01:34:46 +0000 (+0000) Subject: bfin_mac: fix memleak in mii_bus{probe|remove} X-Git-Tag: v2.6.35-rc1~24^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f267de41fde594500cbbccb1b29acb4475f2da2;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git bfin_mac: fix memleak in mii_bus{probe|remove} Fix memory leak with miibus->irq Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller --- diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 39a54ba..368f333 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c @@ -1626,6 +1626,7 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev) return 0; out_err_mdiobus_register: + kfree(miibus->irq); mdiobus_free(miibus); out_err_alloc: peripheral_free_list(pin_req); @@ -1638,6 +1639,7 @@ static int __devexit bfin_mii_bus_remove(struct platform_device *pdev) struct mii_bus *miibus = platform_get_drvdata(pdev); platform_set_drvdata(pdev, NULL); mdiobus_unregister(miibus); + kfree(miibus->irq); mdiobus_free(miibus); peripheral_free_list(pin_req); return 0;