From 5e2d100bfb9b36fcd745b20e31df671f5c0249e4 Mon Sep 17 00:00:00 2001 From: Anh Date: Tue, 9 Jul 2024 15:02:00 -0400 Subject: [PATCH] Fix #1469, f-sanitizer issue in coverage-shared-idma Fix #1469, fix sanitizer issue in coverage-shared-idma test --- src/os/shared/src/osapi-idmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/os/shared/src/osapi-idmap.c b/src/os/shared/src/osapi-idmap.c index 92707553f..13a3d336a 100644 --- a/src/os/shared/src/osapi-idmap.c +++ b/src/os/shared/src/osapi-idmap.c @@ -597,7 +597,6 @@ int32 OS_ObjectIdFindNextFree(OS_object_token_t *token) base_id = OS_GetBaseForObjectType(token->obj_type); max_id = OS_GetMaxForObjectType(token->obj_type); - objtype_state = &OS_objtype_state[token->obj_type]; if (max_id == 0) { @@ -610,8 +609,9 @@ int32 OS_ObjectIdFindNextFree(OS_object_token_t *token) } else { - return_code = OS_ERR_NO_FREE_IDS; - serial = OS_ObjectIdToSerialNumber_Impl(objtype_state->last_id_issued); + return_code = OS_ERR_NO_FREE_IDS; + objtype_state = &OS_objtype_state[token->obj_type]; + serial = OS_ObjectIdToSerialNumber_Impl(objtype_state->last_id_issued); } for (i = 0; i < max_id; ++i)