diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-26 08:21:53 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-26 08:21:53 +0000 |
commit | 804604b6f8784ad364cb5f5512a093b4c215994b (patch) | |
tree | f07e4f55115b1e1775403c970e0433edf6d62381 | |
parent | ab2abe4ccc4445230ba20f61ef3dc1ace8809899 (diff) | |
download | edk2-platforms-804604b6f8784ad364cb5f5512a093b4c215994b.tar.xz |
Fix a memory leak issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3925 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c b/Nt32Pkg/PlatformBdsDxe/Generic/FrontPage.c index 6df4d86426..9ed9bfd38c 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;
}
|