mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
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
This commit is contained in:
parent
4e65e8eab6
commit
03f5f0eb56
1 changed files with 2 additions and 1 deletions
|
|
@ -3140,7 +3140,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. */
|
||||
|
|
@ -3207,6 +3207,7 @@ void lim_process_switch_channel_rsp(tpAniSirGlobal pMac, void *body)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
free:
|
||||
qdf_mem_free(body);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue