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

Commit 830be7e0 authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho
Browse files

wl12xx: free ap keys only in ap mode



The ap keys should be freed only when removing
ap role (otherwise, some arbitrary data might
get freed).

Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 690142e9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2355,10 +2355,10 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
		for (i = 0; i < CONF_TX_MAX_AC_COUNT; i++)
			wl12xx_free_rate_policy(wl,
						&wlvif->ap.ucast_rate_idx[i]);
		wl1271_free_ap_keys(wl, wlvif);
	}

	wl12xx_tx_reset_wlvif(wl, wlvif);
	wl1271_free_ap_keys(wl, wlvif);
	if (wl->last_wlvif == wlvif)
		wl->last_wlvif = NULL;
	list_del(&wlvif->list);