cpmac: use after free
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>
This commit is contained in:
parent
87c1e12b5e
commit
48a29516e8
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue