From 18cdbce1776642215dcd0dc51fd2e5622e1330e7 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Pirla Date: Tue, 4 Jun 2024 10:24:47 -0700 Subject: [PATCH] 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 --- .../logging/src/wlan_connectivity_logging.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/cmn_services/logging/src/wlan_connectivity_logging.c b/components/cmn_services/logging/src/wlan_connectivity_logging.c index 520b739dba..7cc9844ca6 100644 --- a/components/cmn_services/logging/src/wlan_connectivity_logging.c +++ b/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));