diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-05-18 11:40:44 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-05-18 11:40:44 +0200 |
commit | 0fdf1493b41eb64fc7e8c8e1b8830a4bd8c4bbca (patch) | |
tree | dfa33dd2675c2cb313fd9a9d22baf6478efe9367 /net/mac80211/cfg.c | |
parent | 39c1134c66b4552f665da576cb625f184a44a8a3 (diff) | |
download | linux-0fdf1493b41eb64fc7e8c8e1b8830a4bd8c4bbca.tar.bz2 |
mac80211: allocate and fill tidstats only when needed
This fixes memory leaks in the case where we just have the
station info on the stack for internal usage without sending
it to cfg80211.
Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 5ce9d121af2b..bdf6fa78d0d2 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -695,7 +695,7 @@ static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev, if (sta) { ret = 0; memcpy(mac, sta->sta.addr, ETH_ALEN); - sta_set_sinfo(sta, sinfo); + sta_set_sinfo(sta, sinfo, true); } mutex_unlock(&local->sta_mtx); @@ -724,7 +724,7 @@ static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, sta = sta_info_get_bss(sdata, mac); if (sta) { ret = 0; - sta_set_sinfo(sta, sinfo); + sta_set_sinfo(sta, sinfo, true); } mutex_unlock(&local->sta_mtx); |