qcacld-3.0: reset reference count of bss if memory alloc fail

In case of reassoc event handler, it may be possible that driver
doesn't inform kernel about the new bss as well as doesn't reset
the reference count of this bss due to memory allocation failure.

Add changes to reset bss reference count if memory allocation
failed.

Change-Id: I6844d9387dd018e24a4d15bd567294e08ae43941
CRs-Fixed: 2075074
This commit is contained in:
Kapil Gupta 2017-07-11 18:42:39 +05:30 • committed by snandini
commit 8731e8124a

View file

@ -2113,8 +2113,11 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,
buf_ssid_ie, ssid_ie_len);
final_req_ie = qdf_mem_malloc(IW_GENERIC_IE_MAX);
if (final_req_ie == NULL)
if (final_req_ie == NULL) {
if (bss)
cfg80211_put_bss(pAdapter->wdev.wiphy, bss);
goto done;
}
buf_ptr = final_req_ie;
qdf_mem_copy(buf_ptr, buf_ssid_ie, ssid_ie_len);
buf_ptr += ssid_ie_len;