diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-02 17:46:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-03 04:04:37 -0500 |
commit | 48a29516e8b0b8cd59f5afec90a14f49dd9cf967 (patch) | |
tree | 52d72a624421b3372c1a2e8a4143d2a246d364d5 /drivers/net/cpmac.c | |
parent | 87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9 (diff) |
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.c | 2 |
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) | |||
1290 | { | 1290 | { |
1291 | platform_driver_unregister(&cpmac_driver); | 1291 | platform_driver_unregister(&cpmac_driver); |
1292 | mdiobus_unregister(cpmac_mii); | 1292 | mdiobus_unregister(cpmac_mii); |
1293 | mdiobus_free(cpmac_mii); | ||
1294 | iounmap(cpmac_mii->priv); | 1293 | iounmap(cpmac_mii->priv); |
1294 | mdiobus_free(cpmac_mii); | ||
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | module_init(cpmac_init); | 1297 | module_init(cpmac_init); |