Parcourir la source

qcacld-3.0: Clear copied connect ies from connect req

Active connection req fetch may allocate memory to copy the
connect IEs, free after use.

Change-Id: Ida4892cd9efef8a4ebfaf925908eedc19a3d9d7b
CRs-Fixed: 3832469
Vinod Kumar Pirla il y a 1 an
Parent
commit
18cdbce177
1 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 12 0
      components/cmn_services/logging/src/wlan_connectivity_logging.c

+ 12 - 0
components/cmn_services/logging/src/wlan_connectivity_logging.c

@@ -1036,6 +1036,8 @@ wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev,
 	/* for candidate not found case*/
 	if (con_req) {
 		req = *con_req;
+		qdf_mem_zero(&req.scan_ie, sizeof(struct element_info));
+		qdf_mem_zero(&req.assoc_ie, sizeof(struct element_info));
 	} else {
 		status = wlan_cm_get_active_connect_req_param(vdev, &req);
 		if (QDF_IS_STATUS_ERROR(status)) {
@@ -1076,6 +1078,16 @@ wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev,
 	wlan_diag_event.akm = req.crypto.user_akm_suite;
 	wlan_diag_event.auth_algo = req.crypto.user_auth_type;
 
+	if (req.scan_ie.len) {
+		qdf_mem_free(req.scan_ie.ptr);
+		qdf_mem_zero(&req.scan_ie, sizeof(struct element_info));
+	}
+
+	if (req.assoc_ie.len) {
+		qdf_mem_free(req.assoc_ie.ptr);
+		qdf_mem_zero(&req.assoc_ie, sizeof(struct element_info));
+	}
+
 	wlan_diag_event.bt_coex =
 		wlan_mlme_get_bt_profile_con(wlan_vdev_get_psoc(vdev));