From: Emmanuel Grumbach Date: Thu, 29 May 2008 08:35:25 +0000 (+0800) Subject: iwlwifi: fix a memory leak in scan X-Git-Tag: MMI-PSA29.97-13-9~33552^2~338^2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=261415f77a947a452dbd32a35186b2dc3ce14020;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git iwlwifi: fix a memory leak in scan This patch fixes a memory leak that the scan buffer isn't released on exit. Signed-off-by: Emmanuel Grumbach Signed-off-by: Tomas Winkler Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index c9bbfbb8cfa0..61716ba90427 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -911,6 +911,7 @@ void iwl_uninit_drv(struct iwl_priv *priv) iwl_free_calib_results(priv); iwlcore_free_geos(priv); iwl_free_channel_map(priv); + kfree(priv->scan); } EXPORT_SYMBOL(iwl_uninit_drv); diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 244bfe5c751f..72279e07fe32 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -8257,7 +8257,7 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) iwl3945_free_channel_map(priv); iwl3945_free_geos(priv); - + kfree(priv->scan); if (priv->ibss_beacon) dev_kfree_skb(priv->ibss_beacon);