From: Zhu Yi Date: Tue, 24 Jan 2006 08:37:41 +0000 (+0800) Subject: [PATCH] ipw2200: Fix a variable referenced after kfree() bug X-Git-Tag: v2.6.16-rc2~250^2~1^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489f4458cd98592d0bc527d4a5ac1c1393aaf254;p=linux-2.6 [PATCH] ipw2200: Fix a variable referenced after kfree() bug Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index bc18bcbf7d..916b24c544 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -11124,8 +11124,8 @@ static void ipw_pci_remove(struct pci_dev *pdev) /* Free MAC hash list for ADHOC */ for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) { list_for_each_safe(p, q, &priv->ibss_mac_hash[i]) { - kfree(list_entry(p, struct ipw_ibss_seq, list)); list_del(p); + kfree(list_entry(p, struct ipw_ibss_seq, list)); } }