!5096 fix: 异常分支没有释放锁

Merge pull request !5096 from wangwang/0118
This commit is contained in:
openharmony_ci 2024-01-18 07:24:54 +00:00 committed by Gitee
commit 4e8b34cca0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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;