From c5193671e404c7e5a49b45e649517c1beca42277 Mon Sep 17 00:00:00 2001 From: tinlin Date: Fri, 30 Aug 2019 15:42:03 +0800 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_assoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index f90c6ffaccaf..818e8d2121ff 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/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);