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
This commit is contained in:
tinlin
2019-08-30 15:42:03 +08:00
committed by nshrivas
parent 939e0744f7
commit c5193671e4

View File

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