summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@hera.kernel.org>2010-05-20 04:00:59 +0000
committerDavid S. Miller <davem@davemloft.net>2010-05-20 23:13:45 -0700
commit0f0b405cd16f7aaff84a935984cae421897d725d (patch)
treee1c32200241b181edf4ded6600767f8bc04e8095 /drivers
parent41499bd6766314079417d1467c466d31b8612fec (diff)
sh_eth: Fix memleak in sh_mdio_release
Allocated memory for IRQs should be freed when releasing the mii_bus Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sh_eth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 586ed0915a29..501a55ffce57 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -1294,6 +1294,9 @@ static int sh_mdio_release(struct net_device *ndev)
/* remove mdio bus info from net_device */
dev_set_drvdata(&ndev->dev, NULL);
+ /* free interrupts memory */
+ kfree(bus->irq);
+
/* free bitbang info */
free_mdio_bitbang(bus);