summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGovind Singh <govinds@qti.qualcomm.com>2016-07-25 11:49:07 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-07-25 15:36:07 +0530
commit49109c2fd4772a86aeb798854d23199108a09640 (patch)
tree6a1172f90439424a9cc27f4d1a5aefb49ee1bda9
parentfbf093730f9faeb33780238527d0a8849cc2c194 (diff)
qcacld-2.0: Add ndp_ctx NULL check in error scenario
Add ndp_ctx NULL check in error scenario before dereferencing it. Change-Id: I7a6aa92351e0140b78c9d7b95f2a6cca45f8e387 CRs-Fixed: 1044060
-rw-r--r--CORE/HDD/src/wlan_hdd_nan_datapath.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_nan_datapath.c b/CORE/HDD/src/wlan_hdd_nan_datapath.c
index 135d3bcec063..5a28b31c3cb7 100644
--- a/CORE/HDD/src/wlan_hdd_nan_datapath.c
+++ b/CORE/HDD/src/wlan_hdd_nan_datapath.c
@@ -1658,6 +1658,12 @@ static void hdd_ndp_end_ind_handler(hdd_adapter_t *adapter,
continue;
}
ndp_ctx = WLAN_HDD_GET_NDP_CTX_PTR(ndi_adapter);
+ if (!ndp_ctx) {
+ hddLog(LOGE,
+ FL("ndp_ctx is NULL for vdev id: %d"),
+ end_ind->ndp_map[i].vdev_id);
+ continue;
+ }
idx = hdd_get_peer_idx(sta_ctx,
&end_ind->ndp_map[i].peer_ndi_mac_addr);
if (idx == INVALID_PEER_IDX) {