diff options
| author | Vignesh Viswanathan <viswanat@codeaurora.org> | 2018-05-11 17:44:28 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-05-14 11:03:03 -0700 |
| commit | 281a80fe477c75080dedec3d0130b2e585e98a2c (patch) | |
| tree | ee8cab016921aeecd0182c80155607dd0c1c0504 | |
| parent | 6d8154e73f1a8d6f7a95d7d193b4693c311dcd28 (diff) | |
qcacld-3.0: Free body if session is NULL in lim_process_switch_channel_rsp
In lim_process_switch_channel_rsp, if pe_find_session_by_session_id
returns NULL, memory of body pointer is not freed leading to memory
leak.
Free memory allocated for body pointer if session entry is NULL in
lim_process_switch_channel_rsp.
Change-Id: I939aceb3ed993fd1488b72db9df526c1724f0ac5
CRs-Fixed: 2236980
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index 0e6f8b942d2c..34956ae44849 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -3113,7 +3113,7 @@ void lim_process_switch_channel_rsp(tpAniSirGlobal pMac, void *body) psessionEntry = pe_find_session_by_session_id(pMac, peSessionId); if (psessionEntry == NULL) { pe_err("session does not exist for given sessionId"); - return; + goto free; } psessionEntry->ch_switch_in_progress = false; /* HAL fills in the tx power used for mgmt frames in this field. */ @@ -3179,6 +3179,7 @@ void lim_process_switch_channel_rsp(tpAniSirGlobal pMac, void *body) default: break; } +free: qdf_mem_free(body); } |
