diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 1d0dc07bfc65..4c0efc8d6080 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -644,11 +644,10 @@ tSirRetStatus lim_initialize(tpAniSirGlobal pMac) void lim_cleanup(tpAniSirGlobal pMac) { - void *p_cds_gctx; - CDF_STATUS retStatus; - - /*Before destroying the list making sure all the nodes have been deleted - *Which should be the normal case, but a memory leak has been reported + /* + * Before destroying the list making sure all the nodes have been + * deleted Which should be the normal case, but a memory leak has been + * reported */ struct mgmt_frm_reg_info *pLimMgmtRegistration = NULL; @@ -708,15 +707,6 @@ void lim_cleanup(tpAniSirGlobal pMac) /* Now, finally reset the deferred message queue pointers */ lim_reset_deferred_msg_q(pMac); - p_cds_gctx = cds_get_global_context(); - retStatus = wma_de_register_mgmt_frm_client(p_cds_gctx); - - if (retStatus != CDF_STATUS_SUCCESS) - PELOGE(lim_log - (pMac, LOGE, - FL - ("DeRegistering the PE Handle with wma has failed bailing out...")); - ) #if defined WLAN_FEATURE_VOWIFI rrm_cleanup(pMac); #endif diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index c6f0b3ab6b83..8544fa46e5c6 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -3049,6 +3049,11 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, return -ENOMEM; } + if (cds_is_load_unload_in_progress()) { + WMA_LOGE("Load/Unload in progress"); + return -EINVAL; + } + cdf_mem_zero(rx_pkt, sizeof(*rx_pkt)); /*