浏览代码

qcacld-3.0: Fix LFR2 roaming related memory leak issues

Fix LFR2 roaming related memory leak issues in function
lim_send_reassoc_req_with_ft_ies_mgmt_frame() and
wlan_cm_host_roam_start().

Change-Id: I83271b57d0651d680324b67f0e6e6a3694c9ab8c
CRs-Fixed: 2976469
Huashan Qu 3 年之前
父节点
当前提交
fbd16dd492

+ 6 - 2
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -1454,6 +1454,7 @@ bool cm_is_rsn_or_8021x_sha256_auth_type(struct wlan_objmgr_vdev *vdev)
 #ifdef WLAN_FEATURE_HOST_ROAM
 QDF_STATUS wlan_cm_host_roam_start(struct scheduler_msg *msg)
 {
+	QDF_STATUS status;
 	struct cm_host_roam_start_ind *req;
 	struct qdf_mac_addr bssid = QDF_MAC_ADDR_ZERO_INIT;
 
@@ -1461,8 +1462,11 @@ QDF_STATUS wlan_cm_host_roam_start(struct scheduler_msg *msg)
 		return QDF_STATUS_E_FAILURE;
 
 	req = msg->bodyptr;
-	return wlan_cm_roam_invoke(req->pdev, req->vdev_id, &bssid, 0,
-				   CM_ROAMING_FW);
+	status = wlan_cm_roam_invoke(req->pdev, req->vdev_id, &bssid, 0,
+				     CM_ROAMING_FW);
+	qdf_mem_free(req);
+
+	return status;
 }
 
 QDF_STATUS cm_mlme_roam_preauth_fail(struct wlan_objmgr_vdev *vdev,

+ 1 - 1
core/mac/src/pe/lim/lim_send_frames_host_roam.c

@@ -394,7 +394,7 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(struct mac_context *mac_ctx,
 		payload += add_ie_len;
 	}
 
-#ifdef FEATURE_CM_ENABLE
+#ifndef FEATURE_CM_ENABLE
 	pe_session->assoc_req = qdf_mem_malloc(payload);
 	if (pe_session->assoc_req) {
 		/*