diff options
author | Daniel Drake <dsd@laptop.org> | 2010-11-24 11:00:49 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-29 14:41:27 -0500 |
commit | 517ff43146b17a0d067125f098f675d1e0ac2d82 (patch) | |
tree | fdac47449da391f1e3f1b1e6ec17553fbb97fa65 /drivers/net | |
parent | e476a5a41ad67d0e2b4a652820c49a3923eb936b (diff) |
libertas: fix memory corruption in lbs_remove_card()
"priv" is stored at the end of the wiphy structure, which is freed
during the call to lbs_cfg_free(). It must not be touched afterwards.
Remove the unnecessary NULL assignment causing this memory corruption.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 46b88b118c99..fcd1bbfc632d 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -915,8 +915,6 @@ void lbs_remove_card(struct lbs_private *priv) | |||
915 | 915 | ||
916 | lbs_free_adapter(priv); | 916 | lbs_free_adapter(priv); |
917 | lbs_cfg_free(priv); | 917 | lbs_cfg_free(priv); |
918 | |||
919 | priv->dev = NULL; | ||
920 | free_netdev(dev); | 918 | free_netdev(dev); |
921 | 919 | ||
922 | lbs_deb_leave(LBS_DEB_MAIN); | 920 | lbs_deb_leave(LBS_DEB_MAIN); |