Ver Fonte

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 há 7 anos atrás
pai
commit
f7387bda9c
1 ficheiros alterados com 1 adições e 0 exclusões
  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,