Quellcode durchsuchen

qcacmn: Fix NULL pointer dereference in regulatory object

Add NULL check for vdev pointer passed to the regulatory
component to avoid NULL pointer dereference

Change-Id: Ia49ef8ddebab42da5f28f09fb5f7b2b81d91a3b8
CRs-Fixed: 2147328
Kiran Kumar Lokere vor 7 Jahren
Ursprung
Commit
f5a56570a9
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      umac/regulatory/core/src/reg_services.c

+ 4 - 0
umac/regulatory/core/src/reg_services.c

@@ -3156,6 +3156,10 @@ QDF_STATUS reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev)
 	uint32_t vdev_id;
 	uint8_t i;
 
+	if (!vdev) {
+		reg_err("vdev is NULL");
+		return QDF_STATUS_E_INVAL;
+	}
 	op_mode = wlan_vdev_mlme_get_opmode(vdev);
 
 	parent_pdev = wlan_vdev_get_pdev(vdev);