Kaynağa Gözat

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
Kapil Gupta 7 yıl önce
ebeveyn
işleme
8731e8124a
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 4 1
      core/hdd/src/wlan_hdd_assoc.c

+ 4 - 1
core/hdd/src/wlan_hdd_assoc.c

@@ -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;