Skip to content

Commit

Permalink
mac80211: fix a memory leak on sta rate selection table
Browse files Browse the repository at this point in the history
If the rate control algorithm uses a selection table, it
is leaked when the station is destroyed - fix that.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Christophe Prévotaux <cprevotaux@nltinc.com>
Fixes: 0d528d8 ("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 <johannes.berg@intel.com>
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed May 28, 2014
1 parent a9fb541 commit 53d0452
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 53d0452

Please sign in to comment.