From 2b84a4dffb5ada7bca7aa5177db0ad5aa7e9f08d Mon Sep 17 00:00:00 2001 From: wangwang16 Date: Thu, 18 Jan 2024 09:33:24 +0800 Subject: [PATCH] fix: Abnormal branch did not release lock Signed-off-by: wangwang16 Change-Id: Ia39cedc4b1c9bc578791ecf74119778f7b258ba4 --- core/authentication/src/auth_device_common_key.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/authentication/src/auth_device_common_key.c b/core/authentication/src/auth_device_common_key.c index 07ab94c96..a5fc22e65 100755 --- a/core/authentication/src/auth_device_common_key.c +++ b/core/authentication/src/auth_device_common_key.c @@ -541,6 +541,7 @@ void AuthUpdateKeyIndex(const char *udidHash, int32_t keyType, int64_t index, bo AuthDeviceCommonKey *data = (AuthDeviceCommonKey *)LnnMapGet(&g_deviceKeyMap, (const char *)keyStr); if (data == NULL) { AUTH_LOGE(AUTH_KEY, "data is nullptr"); + KeyUnlock(); return; } data->keyInfo.keyIndex = index;