!8430 修复加锁失败后未释放匿名化pkgname

Merge pull request !8430 from wangrui/OpenHarmony-4.1-Release
This commit is contained in:
openharmony_ci 2024-11-21 06:42:03 +00:00 committed by Gitee
commit 39cd758c43
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -149,12 +149,12 @@ static int32_t TryUpdateStartTimeSyncReq(TimeSyncReqInfo *info, const StartTimeS
{
StartTimeSyncReq *item = NULL;
char *anonyPkgName = NULL;
Anonymize(startReq->pkgName, &anonyPkgName);
if (SoftBusMutexLock(&g_startReqListLock) != SOFTBUS_OK) {
LNN_LOGE(LNN_INIT, "lock list err");
return SOFTBUS_LOCK_ERR;
}
char *anonyPkgName = NULL;
Anonymize(startReq->pkgName, &anonyPkgName);
LIST_FOR_EACH_ENTRY(item, &info->startReqList, StartTimeSyncReq, node) {
if (strcmp(startReq->pkgName, item->pkgName) != 0 || item->pid != startReq->pid) {
continue;