summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrunal Soni <ksoni@codeaurora.org>2017-11-06 15:48:01 -0800
committersnandini <snandini@codeaurora.org>2017-11-07 15:32:24 -0800
commitde6dafc2c80e6036f1f2ff439665c4ce150461e3 (patch)
treeae6b70fed8e6f06673a0faf2c911a4e4bc67bd53
parent77ca281e66d5cc2202f95f4e9633954a38ff79ca (diff)
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
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_req_messages.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index f0a415a44818..a8eb1f05af16 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -1873,6 +1873,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,