Browse Source

qcacld-3.0: Fix session lim_join_req memory leak issue

When processing CM_CONNECT_JOIN request, session will be created and
lim_join_req will be allocated in function lim_fill_session_params().
If self-roam happened, lim_handle_reassoc_req() will be called to process
re-assoication. Session lim_join_req will be re-allocated. But orignal
memory not freed.

So, free lim_join_req memory before re-allocate.

Change-Id: Ice748a045732faddde83bc9d7e05651f14d57fbc
CRs-Fixed: 3110030
Yu Ouyang 3 years ago
parent
commit
326162f034
1 changed files with 6 additions and 0 deletions
  1. 6 0
      core/mac/src/pe/lim/lim_process_sme_req_messages.c

+ 6 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -4394,6 +4394,12 @@ static void lim_handle_reassoc_req(struct cm_vdev_join_req *req)
 					session_entry);
 		goto end;
 	}
+
+	if  (session_entry->lim_join_req) {
+		qdf_mem_free(session_entry->lim_join_req);
+		session_entry->lim_join_req = NULL;
+	}
+
 	session_entry->cm_id = req->cm_id;
 	ie_len = util_scan_entry_ie_len(req->entry);
 	bss_len = (uint16_t)(offsetof(struct bss_description,