mac80211: fix BSS leak

The IBSS code leaks a BSS struct after telling
cfg80211 about a given BSS by passing a frame.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by Johannes Berg and committed by John W. Linville f446d10f 22720645

+4 -2
+4 -2
net/mac80211/ibss.c
··· 73 73 struct ieee80211_mgmt *mgmt; 74 74 u8 *pos; 75 75 struct ieee80211_supported_band *sband; 76 + struct cfg80211_bss *bss; 76 77 u32 bss_change; 77 78 u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; 78 79 ··· 178 177 mod_timer(&ifibss->timer, 179 178 round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL)); 180 179 181 - cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel, 182 - mgmt, skb->len, 0, GFP_KERNEL); 180 + bss = cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel, 181 + mgmt, skb->len, 0, GFP_KERNEL); 182 + cfg80211_put_bss(bss); 183 183 cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL); 184 184 } 185 185