diff options
author | Denis Kirjanov <dkirjanov@hera.kernel.org> | 2010-05-20 00:00:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-21 02:13:45 -0400 |
commit | 0f0b405cd16f7aaff84a935984cae421897d725d (patch) | |
tree | e1c32200241b181edf4ded6600767f8bc04e8095 /drivers/net/sh_eth.c | |
parent | 41499bd6766314079417d1467c466d31b8612fec (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/net/sh_eth.c')
-rw-r--r-- | drivers/net/sh_eth.c | 3 |
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) | |||
1294 | /* remove mdio bus info from net_device */ | 1294 | /* remove mdio bus info from net_device */ |
1295 | dev_set_drvdata(&ndev->dev, NULL); | 1295 | dev_set_drvdata(&ndev->dev, NULL); |
1296 | 1296 | ||
1297 | /* free interrupts memory */ | ||
1298 | kfree(bus->irq); | ||
1299 | |||
1297 | /* free bitbang info */ | 1300 | /* free bitbang info */ |
1298 | free_mdio_bitbang(bus); | 1301 | free_mdio_bitbang(bus); |
1299 | 1302 | ||