mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Fix mem leak in lim_handle_csa_offload_msg
The function lim_handle_csa_offload_msg, posts the eWNI_SME_CSA_OFFLOAD_EVENT msg to sme. The csa_offload_ind allocated is not freed during failure cases and this will result in memory leak during the failure cases. Free the memory allocated for csa_offload_ind for the failure cases. CRs-Fixed: 2263376 Change-Id: I6e25500c0e3a0cc2fa71601d935ec9bbe866dc2b
This commit is contained in:
parent
1b740167df
commit
655db19762
1 changed files with 4 additions and 0 deletions
|
|
@ -1966,6 +1966,7 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx,
|
|||
if (!session_entry) {
|
||||
pe_err("Session does not exists for %pM",
|
||||
csa_params->bssId);
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
@ -1974,11 +1975,13 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx,
|
|||
|
||||
if (!sta_ds) {
|
||||
pe_err("sta_ds does not exist");
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!LIM_IS_STA_ROLE(session_entry)) {
|
||||
pe_debug("Invalid role to handle CSA");
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
@ -2152,6 +2155,7 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx,
|
|||
(session_entry->ch_width ==
|
||||
session_entry->gLimChannelSwitch.ch_width)) {
|
||||
pe_debug("Ignore CSA, no change in ch and bw");
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue