Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd9dc49c authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville
Browse files

wl1271: Fix memory leaks on driver initialization



This patch fixes some memory leaks occurring during driver init/de-init.

Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c15cf5fc
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -1093,6 +1093,14 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
		wl->tx_blocks_freed[i] = 0;
		wl->tx_blocks_freed[i] = 0;


	wl1271_debugfs_reset(wl);
	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);
	mutex_unlock(&wl->mutex);
}
}


@@ -2387,7 +2395,6 @@ int wl1271_free_hw(struct wl1271 *wl)


	wl1271_debugfs_exit(wl);
	wl1271_debugfs_exit(wl);


	kfree(wl->target_mem_map);
	vfree(wl->fw);
	vfree(wl->fw);
	wl->fw = NULL;
	wl->fw = NULL;
	kfree(wl->nvs);
	kfree(wl->nvs);