Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 517ff431 authored by Daniel Drake's avatar Daniel Drake Committed by John W. Linville
Browse files

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: default avatarDaniel Drake <dsd@laptop.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e476a5a4
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);