Skip to content

Commit

Permalink
sh_eth: Fix memleak in sh_mdio_release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed May 21, 2010
1 parent 41499bd commit 0f0b405
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0f0b405

Please sign in to comment.