From: Daniel Drake Date: Wed, 24 Nov 2010 16:00:49 +0000 (+0000) Subject: libertas: fix memory corruption in lbs_remove_card() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=517ff43146b17a0d067125f098f675d1e0ac2d82;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: John W. Linville --- 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) lbs_free_adapter(priv); lbs_cfg_free(priv); - - priv->dev = NULL; free_netdev(dev); lbs_deb_leave(LBS_DEB_MAIN);