summaryrefslogtreecommitdiffstats
path: root/drivers/net/cpmac.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-02 23:46:10 +0100
committerDavid S. Miller <davem@davemloft.net>2010-03-03 10:04:37 +0100
commit48a29516e8b0b8cd59f5afec90a14f49dd9cf967 (patch)
tree52d72a624421b3372c1a2e8a4143d2a246d364d5 /drivers/net/cpmac.c
parentipsec: Fix bogus bundle flowi (diff)
downloadlinux-48a29516e8b0b8cd59f5afec90a14f49dd9cf967.tar.xz
linux-48a29516e8b0b8cd59f5afec90a14f49dd9cf967.zip
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>
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r--drivers/net/cpmac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index b85c81f60d10..9d489421535e 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -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);