Browse Source

qcacld-3.0: Possible null pointer dereference

In hdd_dis_connect_handler, roam_info is checked
for NULL in if(roam_info && roam_info->disconnect_ies),
but roam_info may be null pointer and is explicitly
dereferenced later. Add null pointer check before
it is dereferenced again.

Change-Id: I51f731323f01ddc657c57d20d8c63317400c92ab
CRs-Fixed: 2518450
tinlin 5 years ago
parent
commit
c5193671e4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/hdd/src/wlan_hdd_assoc.c

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

@@ -1771,7 +1771,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
 			 * to ICS UI.
 			 */
 			if (eCSR_ROAM_LOSTLINK == roam_status) {
-				if (roam_info->reasonCode ==
+				if (roam_info && roam_info->reasonCode ==
 				    eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON)
 					pr_info("wlan: disconnected due to poor signal, rssi is %d dB\n",
 						roam_info->rxRssi);