summaryrefslogtreecommitdiffstats
path: root/drivers/net/sh_eth.c
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@hera.kernel.org>2010-05-20 06:00:59 +0200
committerDavid S. Miller <davem@davemloft.net>2010-05-21 08:13:45 +0200
commit0f0b405cd16f7aaff84a935984cae421897d725d (patch)
treee1c32200241b181edf4ded6600767f8bc04e8095 /drivers/net/sh_eth.c
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/... (diff)
downloadlinux-0f0b405cd16f7aaff84a935984cae421897d725d.tar.xz
linux-0f0b405cd16f7aaff84a935984cae421897d725d.zip
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/net/sh_eth.c')
-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);