From df113d50e30d5144302dd55c8284ea13c3749b9e Mon Sep 17 00:00:00 2001 From: h30013885 Date: Mon, 23 Dec 2024 21:18:55 +0800 Subject: [PATCH] fix crash Signed-off-by: h30013885 --- services/device_auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/device_auth.c b/services/device_auth.c index 1757b13e..e7ef59ad 100644 --- a/services/device_auth.c +++ b/services/device_auth.c @@ -1704,8 +1704,6 @@ DEVICE_AUTH_API_PUBLIC int InitDeviceAuthService(void) if (res != HC_SUCCESS) { return res; } - InitAccountTaskManager(); - InitOsAccountAdapter(); res = InitAllModules(); if (res != HC_SUCCESS) { DestroyGmAndGa(); @@ -1713,6 +1711,8 @@ DEVICE_AUTH_API_PUBLIC int InitDeviceAuthService(void) } INIT_PERFORMANCE_DUMPER(); InitPseudonymModule(); + InitAccountTaskManager(); + InitOsAccountAdapter(); SetInitStatus(); LOGI("[End]: [Service]: Init device auth service successfully!"); return HC_SUCCESS; @@ -1725,6 +1725,8 @@ DEVICE_AUTH_API_PUBLIC void DestroyDeviceAuthService(void) LOGI("[End]: [Service]: The service has not been initialized!"); return; } + DestroyOsAccountAdapter(); + DestroyAccountTaskManager(); DestroyTaskManager(); DestroyDevSessionManager(); DestroyGroupManager(); @@ -1735,8 +1737,6 @@ DEVICE_AUTH_API_PUBLIC void DestroyDeviceAuthService(void) DestroyCallbackManager(); DESTROY_PERFORMANCE_DUMPER(); DestroyPseudonymManager(); - DestroyOsAccountAdapter(); - DestroyAccountTaskManager(); SetDeInitStatus(); LOGI("[End]: [Service]: Destroy device auth service successfully!"); }