qcacld-3.0: Fix memory leak while populating the peer rate set

Fix the possible memory leak while populating the peer rate set

Change-Id: I9d16c0c4a9e6ead4b82c1112333e11aa6379c7de
CRs-Fixed: 2593986
This commit is contained in:
Kiran Kumar Lokere 2019-12-30 16:31:09 -08:00 • committed by nshrivas
commit e8ef2ca819

View file

@ -1797,7 +1797,7 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac,
tDot11fIEhe_cap *peer_he_caps;
struct bss_description *bssDescription =
&pe_session->lim_join_req->bssDescription;
tSchBeaconStruct *pBeaconStruct;
tSchBeaconStruct *pBeaconStruct = NULL;
/* copy operational rate set from pe_session */
if (pe_session->rateSet.numRates <= WLAN_SUPPORTED_RATES_IE_MAX_LEN) {
@ -1952,6 +1952,9 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac,
}
pe_debug("nss: %d", pe_session->nss);
if (pBeaconStruct)
qdf_mem_free(pBeaconStruct);
return QDF_STATUS_SUCCESS;
} /*** lim_populate_peer_rate_set() ***/