diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-21 05:33:41 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-21 05:33:41 +0000 |
commit | 4a1102c9aedce3e4244efcc822794e9cc6da4dee (patch) | |
tree | a9301618d1f151ad546ef0a123874ae84501371d /MdeModulePkg/Library/UefiHiiLib | |
parent | 29dd3b04b09d6efb3c2c3e79e71a998d9b6c79b3 (diff) | |
download | edk2-platforms-4a1102c9aedce3e4244efcc822794e9cc6da4dee.tar.xz |
K8:
1) add in more ASSERT condition and updates the comment for HexStringToBuf.
2) Check the pointer returned by HiiLibGetHiiHandles.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7324 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/UefiHiiLib')
-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;
}
|