// Set file system information.\r
//\r
if (CompareGuid (InformationType, &gEfiFileSystemInfoGuid)) {\r
- if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (PrivateRoot->VolumeLabel)) {\r
+ NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;\r
+ if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (NewFileSystemInfo->VolumeLabel)) {\r
Status = EFI_BAD_BUFFER_SIZE;\r
goto Done;\r
}\r
\r
- NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;\r
\r
FreePool (PrivateRoot->VolumeLabel);\r
PrivateRoot->VolumeLabel = AllocatePool (StrSize (NewFileSystemInfo->VolumeLabel));\r