diff --git a/core/bus_center/lnn/lane_hub/time_sync/src/lnn_time_sync_manager.c b/core/bus_center/lnn/lane_hub/time_sync/src/lnn_time_sync_manager.c index 27f4a3e22..fcefe8869 100644 --- a/core/bus_center/lnn/lane_hub/time_sync/src/lnn_time_sync_manager.c +++ b/core/bus_center/lnn/lane_hub/time_sync/src/lnn_time_sync_manager.c @@ -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;