Parcourir la source

qcacld-3.0: Check if wma pointer is NULL

In wma_is_roam_in_progress function, return false if wma pointer
returned from cds_get_context is NULL.

Change-Id: I0a3447f038a45ea93e769142cb5883a3f39c0991
CRs-Fixed: 2475071
Saket Jha il y a 5 ans
Parent
commit
451d3db96a
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      core/wma/src/wma_data.c

+ 3 - 0
core/wma/src/wma_data.c

@@ -3308,5 +3308,8 @@ bool wma_is_roam_in_progress(uint32_t vdev_id)
 {
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 
+	if (!wma)
+		return false;
+
 	return wma->interfaces[vdev_id].roaming_in_progress;
 }