diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e333410e38f7..3158c3c2f290 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3794,7 +3794,6 @@ int hdd_vdev_destroy(struct hdd_adapter *adapter) } release_vdev: - ucfg_scan_clear_vdev_del_in_progress(adapter->vdev); /* do vdev logical destroy via objmgr */ errno = hdd_objmgr_release_and_destroy_vdev(adapter); diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index d401e2a4674b..77adf76a8d35 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -357,17 +357,17 @@ QDF_STATUS sap_deinit_ctx(struct sap_context *sap_ctx) return QDF_STATUS_E_FAULT; } ucfg_scan_unregister_requester(pmac->psoc, sap_ctx->req_id); - sap_free_roam_profile(&sap_ctx->csr_roamProfile); - if (sap_ctx->sessionId != CSR_SESSION_ID_INVALID) { - /* empty queues/lists/pkts if any */ - sap_clear_session_param(hal, sap_ctx, sap_ctx->sessionId); - } if (sap_ctx->channelList) { qdf_mem_free(sap_ctx->channelList); sap_ctx->channelList = NULL; sap_ctx->num_of_channel = 0; } + sap_free_roam_profile(&sap_ctx->csr_roamProfile); + if (sap_ctx->sessionId != CSR_SESSION_ID_INVALID) { + /* empty queues/lists/pkts if any */ + sap_clear_session_param(hal, sap_ctx, sap_ctx->sessionId); + } return QDF_STATUS_SUCCESS; }