From: Felix Fietkau Date: Tue, 27 May 2014 20:33:57 +0000 (+0200) Subject: mac80211: fix a memory leak on sta rate selection table X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=53d045258ee2e38b1e882617cb0799a04d05f5fa;p=linux-beck.git mac80211: fix a memory leak on sta rate selection table If the rate control algorithm uses a selection table, it is leaked when the station is destroyed - fix that. Signed-off-by: Felix Fietkau Reported-by: Christophe Prévotaux Fixes: 0d528d85c519 ("mac80211: improve the rate control API") Cc: stable@vger.kernel.org # v3.10+ [add commit log entry, remove pointless NULL check] Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index c34a5f97abc7..be9120fb8448 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -240,6 +240,7 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta) sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr); + kfree(rcu_dereference_raw(sta->sta.rates)); kfree(sta); }