浏览代码

qcacld-3.0: Fix memory leak while handling deauth req's error case

When caller calls lim_process_mlm_deauth_req() API, it checks for
session's validity before passing it forward. If session is found
to be invalid then it is returning immediately without releasing the
memory. Caller is expecting this API to release the memory in any
error cases.

Release the memory before returning to caller in error case.

CRs-Fixed: 2138983
Change-Id: I800d717cd22a6e2731ef211743e4844852a132a3
Krunal Soni 7 年之前
父节点
当前提交
f7387bda9c
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      core/mac/src/pe/lim/lim_process_mlm_req_messages.c

+ 1 - 0
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -1888,6 +1888,7 @@ lim_process_mlm_deauth_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 	if (NULL == session) {
 		pe_err("session does not exist for given sessionId %d",
 			mlm_deauth_req->sessionId);
+		qdf_mem_free(mlm_deauth_req);
 		return;
 	}
 	lim_process_mlm_deauth_req_ntf(mac_ctx, QDF_STATUS_SUCCESS,