On Sun, 2013-12-01 at 13:01 +0530, Ujjal Roy wrote: > + if (!bss) > + save_bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, > + wdev->ssid, wdev->ssid_len, > + WLAN_CAPABILITY_ESS, > + WLAN_CAPABILITY_ESS); > if (wdev->current_bss) { > cfg80211_unhold_bss(wdev->current_bss); > cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); > @@ -651,10 +657,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, > > if (!bss) { > WARN_ON_ONCE(!wiphy_to_dev(wdev->wiphy)->ops->connect); > - bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, > - wdev->ssid, wdev->ssid_len, > - WLAN_CAPABILITY_ESS, > - WLAN_CAPABILITY_ESS); > + bss = save_bss; In an unsuccessful result case, this leaks the BSS struct. I'd prefer to reshuffle the code a bit to not need a separate save_bss variable, but I don't immediately see an easy way to do that. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html