Skip to content

Commit

Permalink
wl1271: Fix memory leaks on driver initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Apr 9, 2010
1 parent c15cf5f commit bd9dc49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bd9dc49

Please sign in to comment.