Bläddra i källkod

qcacld-3.0: Add NULL check for hdd_ctx

In function hdd_update_dp_vdev_flags, hdd_ctx is not being
validated before dereference.

Add NULL check for hdd_ctx.

Change-Id: Id907e273ec3d135c0e140d3b8b9aa6346af2d9a3
CRs-Fixed: 2162252
Sourav Mohapatra 7 år sedan
förälder
incheckning
5febc939e0
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      core/hdd/src/wlan_hdd_assoc.c

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

@@ -1917,6 +1917,11 @@ QDF_STATUS hdd_update_dp_vdev_flags(void *cbk_data,
 	psoc = cbk_data;
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+	if (!hdd_ctx) {
+		hdd_err("Invalid HDD Context");
+		return QDF_STATUS_E_INVAL;
+	}
+
 	if (!hdd_ctx->tdls_nap_active)
 		return status;