- RtlStringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer),
- L"multi(0)disk(0)rdisk(%lu)partition(%lu)\\",
- DiskEntry->BiosDiskNumber,
- PartEntry->OnDiskPartitionNumber);
- ConcatPaths(PathBuffer, ARRAYSIZE(PathBuffer), 1, InstallationDir);
- RtlCreateUnicodeString(&pSetupData->DestinationArcPath, PathBuffer);
+ Status = RtlStringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer),
+ L"multi(0)disk(0)rdisk(%lu)partition(%lu)\\",
+ DiskEntry->BiosDiskNumber,
+ PartEntry->OnDiskPartitionNumber);
+
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("RtlStringCchPrintfW() failed with status 0x%08lx\n", Status);
+ RtlFreeUnicodeString(&pSetupData->DestinationRootPath);
+ return Status;
+ }
+
+ Status = ConcatPaths(PathBuffer, ARRAYSIZE(PathBuffer), 1, InstallationDir);
+
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("ConcatPaths() failed with status 0x%08lx\n", Status);
+ RtlFreeUnicodeString(&pSetupData->DestinationRootPath);
+ return Status;
+ }
+
+ Status = RtlCreateUnicodeString(&pSetupData->DestinationArcPath, PathBuffer) ? STATUS_SUCCESS : STATUS_NO_MEMORY;
+
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("RtlCreateUnicodeString() failed with status 0x%08lx\n", Status);
+ RtlFreeUnicodeString(&pSetupData->DestinationRootPath);
+ return Status;
+ }