diff options
| author | Krunal Soni <ksoni@codeaurora.org> | 2017-11-07 10:30:11 -0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-11-07 15:32:30 -0800 |
| commit | 72fe2dedd0063e86176c67b44af66c0f35134f78 (patch) | |
| tree | 10151183700448fd6d553ced384b1eeb42b96f95 | |
| parent | 7a5507ea0a5bb12c6a58fd55795ae1c0c2e3d255 (diff) | |
qcacld-3.0: Fix memory leaks while handling few error cases in PE
Memory leaks have been noted in protocol stack in few of the error
handling cases.
Fix following APIs through releasing the memory in error cases.
lim_process_mlm_auth_req()
lim_process_mlm_set_keys_req()
CRs-Fixed: 2139571
Change-Id: Ie28861dab49ab93d90fde5ebc5fd260d1c1c4eee
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_mlm_req_messages.c | 4 |
1 files changed, 4 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 a8eb1f05af16..453d693127b8 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 @@ -1033,6 +1033,8 @@ static void lim_process_mlm_auth_req(tpAniSirGlobal mac_ctx, uint32_t *msg) session = pe_find_session_by_session_id(mac_ctx, session_id); if (NULL == session) { pe_err("SessionId:%d does not exist", session_id); + qdf_mem_free(msg); + mac_ctx->lim.gpLimMlmAuthReq = NULL; return; } @@ -1915,6 +1917,8 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) mlm_set_keys_req->sessionId); if (NULL == session) { pe_err("session does not exist for given sessionId"); + qdf_mem_free(mlm_set_keys_req); + mac_ctx->lim.gpLimMlmSetKeysReq = NULL; return; } |
