diff options
Diffstat (limited to 'MdeModulePkg/Library/UefiHiiLib/HiiString.c')
-rw-r--r-- | MdeModulePkg/Library/UefiHiiLib/HiiString.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiString.c b/MdeModulePkg/Library/UefiHiiLib/HiiString.c index e10b1c72ee..c6cef6dc62 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiString.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiString.c @@ -325,8 +325,8 @@ HiiLibGetStringFromToken ( EFI_GUID Guid;
Status = HiiLibGetHiiHandles (&HandleBufferLen, &HiiHandleBuffer);
- if (EFI_ERROR(Status)) {
- return Status;
+ if (HiiHandleBuffer == NULL) {
+ return EFI_NOT_FOUND;
}
for (Index = 0; Index < (HandleBufferLen / sizeof (EFI_HII_HANDLE)); Index++) {
Status = HiiLibExtractGuidFromHiiHandle (HiiHandleBuffer[Index], &Guid);
@@ -350,9 +350,8 @@ HiiLibGetStringFromToken ( Status = HiiLibGetStringFromHandle (HiiHandleBuffer[Index], StringId, String);
Out:
- if (HiiHandleBuffer != NULL) {
- FreePool (HiiHandleBuffer);
- }
+ FreePool (HiiHandleBuffer);
+
return Status;
}
|