77f5f8b3064c06b8ef79c876c334629ce5f95c90
[oweals/openwrt.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 8 Jan 2020 18:03:04 +0100
3 Subject: [PATCH] cfg80211: fix memory leak in cfg80211_cqm_rssi_update
4
5 The per-tid statistics need to be released after the call to rdev_get_station
6
7 Cc: stable@vger.kernel.org
8 Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info")
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/net/wireless/nl80211.c
13 +++ b/net/wireless/nl80211.c
14 @@ -10847,6 +10847,7 @@ static int cfg80211_cqm_rssi_update(stru
15                 if (err)
16                         return err;
17  
18 +               cfg80211_sinfo_release_content(&sinfo);
19                 if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG))
20                         wdev->cqm_config->last_rssi_event_value =
21                                 (s8) sinfo.rx_beacon_signal_avg;