sh_eth: Fix memleak in sh_mdio_release
authorDenis Kirjanov <dkirjanov@hera.kernel.org>
Thu, 20 May 2010 04:00:59 +0000 (04:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 May 2010 06:13:45 +0000 (23:13 -0700)
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>
drivers/net/sh_eth.c

index 586ed0915a293f25d6dd5d6cd1fee28e6ece283e..501a55ffce570d5e9920efb6933346705473e872 100644 (file)
@@ -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);