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>
This commit is contained in:
committed by
David S. Miller
parent
41499bd676
commit
0f0b405cd1
@@ -1294,6 +1294,9 @@ static int sh_mdio_release(struct net_device *ndev)
|
|||||||
/* remove mdio bus info from net_device */
|
/* remove mdio bus info from net_device */
|
||||||
dev_set_drvdata(&ndev->dev, NULL);
|
dev_set_drvdata(&ndev->dev, NULL);
|
||||||
|
|
||||||
|
/* free interrupts memory */
|
||||||
|
kfree(bus->irq);
|
||||||
|
|
||||||
/* free bitbang info */
|
/* free bitbang info */
|
||||||
free_mdio_bitbang(bus);
|
free_mdio_bitbang(bus);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user