Browse Source

qcacld-3.0: Validate hdd_ctx in set peer authorized event

Add a check to validate hdd context in
hdd_set_peer_authorized_event api.

Change-Id: If3f2ed8262f0690d3633da9033531d53709db6e6
CRs-Fixed: 2259273
Ashish Kumar Dhanotiya 6 years ago
parent
commit
ab2a929bb1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      core/hdd/src/wlan_hdd_assoc.c

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

@@ -1878,6 +1878,10 @@ static void hdd_set_peer_authorized_event(uint32_t vdev_id)
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	struct hdd_adapter *adapter = NULL;
 
+	if (!hdd_ctx) {
+		hdd_err("Invalid hdd context");
+		return;
+	}
 	adapter = hdd_get_adapter_by_vdev(hdd_ctx, vdev_id);
 	if (adapter == NULL) {
 		hdd_err("Invalid vdev_id");