qcacld-3.0: Fix a memory leak in hdd_assoc handler

Function wlan_hdd_cfg80211_update_bss_db will return pointer of
struct cfg80211_bss.
Caller should invoke cfg80211_put_bss to free resource in pointer.
In some case those resource not be free.

Change-Id: I7fa55a09fcc3515361e9568cf87966e4533085e4
CRs-Fixed: 2146717
This commit is contained in:
Jiachao Wu 2017-11-21 10:43:27 +08:00 • committed by snandini
commit 0411bc9be0

View file

@ -2787,6 +2787,10 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
eCSR_DISCONNECT_REASON_UNSPECIFIED);
}
return QDF_STATUS_E_FAILURE;
} else {
cfg80211_put_bss(
hdd_ctx->wiphy,
bss);
}
if (roam_info->u.pConnectedProfile->AuthType ==
eCSR_AUTH_TYPE_FT_RSN
@ -3003,10 +3007,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
}
}
if (!hddDisconInProgress) {
cfg80211_put_bss(
hdd_ctx->wiphy,
bss);
/*
* Perform any WMM-related association
* processing.