summaryrefslogtreecommitdiff
path: root/drivers/net/bfin_mac.c
diff options
context:
space:
mode:
authorDenis Kirjanov <kirjanov@gmail.com>2010-05-18 05:34:46 +0400
committerDavid S. Miller <davem@davemloft.net>2010-05-24 10:18:32 +0400
commit7f267de41fde594500cbbccb1b29acb4475f2da2 (patch)
tree45adb66c16b4b5a6a91ff281ce824027bde3ffe6 /drivers/net/bfin_mac.c
parentee02a4ef40f2e049c80f9cc04e21a9b48288b6ff (diff)
downloadlinux-7f267de41fde594500cbbccb1b29acb4475f2da2.tar.xz
bfin_mac: fix memleak in mii_bus{probe|remove}
Fix memory leak with miibus->irq Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bfin_mac.c')
-rw-r--r--drivers/net/bfin_mac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 39a54bad397f..368f33313fb6 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;