summaryrefslogtreecommitdiff
path: root/Nt32Pkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-26 08:21:53 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-26 08:21:53 +0000
commit804604b6f8784ad364cb5f5512a093b4c215994b (patch)
treef07e4f55115b1e1775403c970e0433edf6d62381 /Nt32Pkg
parentab2abe4ccc4445230ba20f61ef3dc1ace8809899 (diff)
downloadedk2-804604b6f8784ad364cb5f5512a093b4c215994b.zip
edk2-804604b6f8784ad364cb5f5512a093b4c215994b.tar.gz
edk2-804604b6f8784ad364cb5f5512a093b4c215994b.tar.bz2
Fix a memory leak issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3925 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg')
-rw-r--r--Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c b/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c
index 6df4d86..9ed9bfd 100644
--- a/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c
+++ b/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c
@@ -343,10 +343,11 @@ ReInitStrings:
BufferSize = 0;
Status = gHii->GetString (gHii, gStringPackHandle, 1, TRUE, Lang, &BufferSize, NULL);
- ASSERT(Status == EFI_BUFFER_TOO_SMALL);
+ ASSERT (Status == EFI_BUFFER_TOO_SMALL);
StringBuffer = AllocateZeroPool (BufferSize);
ASSERT (StringBuffer != NULL);
Status = gHii->GetString (gHii, gStringPackHandle, 1, TRUE, Lang, &BufferSize, StringBuffer);
+ ASSERT_EFI_ERROR (Status);
gHii->NewString (gHii, NULL, gStringPackHandle, &Token, StringBuffer);
FreePool (StringBuffer);
CopyMem (&OptionList[OptionCount].StringToken, &Token, sizeof (UINT16));
@@ -382,9 +383,7 @@ ReInitStrings:
gHii->UpdateForm (gHii, gFrontPageHandle, (EFI_FORM_LABEL) 0x0002, TRUE, UpdateData);
FreePool (UpdateData);
- //
- // FreePool (OptionList);
- //
+ FreePool (OptionList);
return Status;
}