summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-04-09 11:07:26 +0300
committerJohn W. Linville <linville@tuxdriver.com>2010-04-09 13:43:09 -0400
commitbd9dc49cd565aeb20d4f6eb2f6af4c16acce2ef5 (patch)
treeaef1da42f29437125a281d75903c4beb60b74e4b /drivers/net/wireless/wl12xx
parentc15cf5fcf9ea0a7749536c201965370d99c86c7f (diff)
wl1271: Fix memory leaks on driver initialization
This patch fixes some memory leaks occurring during driver init/de-init. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 5c32d8d7236..4e9754056d4 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1093,6 +1093,14 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
wl->tx_blocks_freed[i] = 0;
wl1271_debugfs_reset(wl);
+
+ kfree(wl->fw_status);
+ wl->fw_status = NULL;
+ kfree(wl->tx_res_if);
+ wl->tx_res_if = NULL;
+ kfree(wl->target_mem_map);
+ wl->target_mem_map = NULL;
+
mutex_unlock(&wl->mutex);
}
@@ -2387,7 +2395,6 @@ int wl1271_free_hw(struct wl1271 *wl)
wl1271_debugfs_exit(wl);
- kfree(wl->target_mem_map);
vfree(wl->fw);
wl->fw = NULL;
kfree(wl->nvs);