Skip to content

Commit

Permalink
libertas: fix memory corruption in lbs_remove_card()
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Daniel Drake authored and John W. Linville committed Nov 29, 2010
1 parent e476a5a commit 517ff43
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,6 @@ void lbs_remove_card(struct lbs_private *priv)

lbs_free_adapter(priv);
lbs_cfg_free(priv);

priv->dev = NULL;
free_netdev(dev);

lbs_deb_leave(LBS_DEB_MAIN);
Expand Down

0 comments on commit 517ff43

Please sign in to comment.