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
Este commit está contenido en:
Vinod Kumar Pirla
2024-06-04 10:24:47 -07:00
cometido por Ravindra Konda
padre 1ba2470d35
commit 18cdbce177

Ver fichero

@@ -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));