From: Eliad Peller Date: Mon, 19 Mar 2012 09:32:55 +0000 (+0200) Subject: wl12xx: free ap keys only in ap mode X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=830be7e021efd3a801ed0113e6a2244020679a13;p=linux-beck.git 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: Eliad Peller Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 7618eb73cb33..e21d21d7de8e 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -2355,10 +2355,10 @@ deinit: 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);