diff --git a/platform/src/health_check.cpp b/platform/src/health_check.cpp index 5bb62f0..2d0bc01 100644 --- a/platform/src/health_check.cpp +++ b/platform/src/health_check.cpp @@ -252,7 +252,6 @@ int health_check_session_del(uint64_t session_id, int profile_id) struct bfd_vtysh_client client; struct session_iterm *tmp = NULL; - sf_status_delete(g_sf_status, profile_id); tmp = health_check_get_iterm_by_id(session_id); if (!tmp) { LOG_DEBUG("health check session table delete: session id [%lu] not exists", session_id); @@ -276,6 +275,7 @@ int health_check_session_del(uint64_t session_id, int profile_id) end: pthread_rwlock_wrlock(&g_handle.rwlock); HASH_DELETE(hh1, g_handle.root_by_id, tmp); + sf_status_delete(g_sf_status, profile_id); pthread_rwlock_unlock(&g_handle.rwlock); free(tmp); tmp = NULL;