aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-04-09 04:07:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-09 13:43:09 -0400
commitbd9dc49cd565aeb20d4f6eb2f6af4c16acce2ef5 (patch)
treeaef1da42f29437125a281d75903c4beb60b74e4b
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>
-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 5c32d8d72361..4e9754056d45 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,
1093 wl->tx_blocks_freed[i] = 0; 1093 wl->tx_blocks_freed[i] = 0;
1094 1094
1095 wl1271_debugfs_reset(wl); 1095 wl1271_debugfs_reset(wl);
1096
1097 kfree(wl->fw_status);
1098 wl->fw_status = NULL;
1099 kfree(wl->tx_res_if);
1100 wl->tx_res_if = NULL;
1101 kfree(wl->target_mem_map);
1102 wl->target_mem_map = NULL;
1103
1096 mutex_unlock(&wl->mutex); 1104 mutex_unlock(&wl->mutex);
1097} 1105}
1098 1106
@@ -2387,7 +2395,6 @@ int wl1271_free_hw(struct wl1271 *wl)
2387 2395
2388 wl1271_debugfs_exit(wl); 2396 wl1271_debugfs_exit(wl);
2389 2397
2390 kfree(wl->target_mem_map);
2391 vfree(wl->fw); 2398 vfree(wl->fw);
2392 wl->fw = NULL; 2399 wl->fw = NULL;
2393 kfree(wl->nvs); 2400 kfree(wl->nvs);