]> err.no Git - linux-2.6/commitdiff
iwlwifi: fix a memory leak in scan
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 29 May 2008 08:35:25 +0000 (16:35 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 3 Jun 2008 19:00:26 +0000 (15:00 -0400)
This patch fixes a memory leak that the scan buffer isn't released
on exit.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index c9bbfbb8cfa0bf395a401ef4fd5eb952182ee672..61716ba90427fdefb58f483ecaaa3c7aff2ac518 100644 (file)
@@ -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);
 
index 244bfe5c751fe291188bbd618a5389fcf8ba969e..72279e07fe325d9b8d68e1b5c6482d646867366a 100644 (file)
@@ -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);