Skip to content

Commit

Permalink
cpmac: use after free
Browse files Browse the repository at this point in the history
The original code dereferenced "cpmac_mii" after calling
"mdiobus_free(cpmac_mii);"

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Mar 3, 2010
1 parent 87c1e12 commit 48a2951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1290,8 +1290,8 @@ void __devexit cpmac_exit(void)
{
platform_driver_unregister(&cpmac_driver);
mdiobus_unregister(cpmac_mii);
mdiobus_free(cpmac_mii);
iounmap(cpmac_mii->priv);
mdiobus_free(cpmac_mii);
}

module_init(cpmac_init);
Expand Down

0 comments on commit 48a2951

Please sign in to comment.