diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-29 06:58:38 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-29 06:58:38 +0000 |
commit | c8dd259d6174c01569f2a6da7243d74d727b2678 (patch) | |
tree | 1f861a814a64b6a1960135563d3de20bc36cc32b /EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c | |
parent | cb360b2656f4ca06b0b216dd7b9933312abeb786 (diff) | |
download | edk2-platforms-c8dd259d6174c01569f2a6da7243d74d727b2678.tar.xz |
1. Use MemoryAllocationLib to replace boot services memory services functions in EdkModulePkg.
2. Added NULL pointer check before calling FreePool () to fix bugs when free memory.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2513 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c')
-rw-r--r-- | EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c index 8c81fd8c54..6bbe810ee2 100644 --- a/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c +++ b/EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Presentation.c @@ -1,12 +1,12 @@ /*++
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Presentation.c
@@ -60,7 +60,7 @@ ClearLines ( gST->ConOut->SetCursorPosition (gST->ConOut, LeftColumn, TopRow);
- gBS->FreePool (Buffer);
+ FreePool (Buffer);
return ;
}
@@ -237,7 +237,7 @@ DisplayPageFrame ( break;
}
- gBS->FreePool (StrFrontPageBanner);
+ FreePool (StrFrontPageBanner);
}
}
}
@@ -318,7 +318,7 @@ DisplayPageFrame ( }
}
- gBS->FreePool (Buffer);
+ FreePool (Buffer);
}
@@ -327,7 +327,7 @@ DisplayPageFrame ( ?F2=Previous Page Setup Page ?
+------------------------------------------------------------------------------+
-
+
@@ -437,7 +437,7 @@ DisplayForm ( //
// Remove Buffer allocated for StringPtr after it has been used.
//
- gBS->FreePool (StringPtr);
+ FreePool (StringPtr);
for (Index = 0; FormTags.Tags[Index].Operand != EFI_IFR_END_FORM_OP; Index++) {
GrayOut = FALSE;
@@ -595,7 +595,7 @@ GetOut: FormTags.Tags[Index].NumberOfLines++;
}
- gBS->FreePool (OutputString);
+ FreePool (OutputString);
}
ArrayEntry = 0;
@@ -1113,9 +1113,9 @@ Routine Description: The function does the most of the works when the EFI_TAG that
user selects on is EFI_IFR_FLAG_INTERACTIVE or EFI_IFR_PASSWORD_OP:
invoke CallBack, update the new form data.
-
+
Arguments:
-
+
Selection - The current selection of the form.
CallbackData - The pointer to host the data passed back by the callback function.
FileFormTagsHead - Prompt string token of the one-of box
@@ -1123,10 +1123,10 @@ Arguments: FormHandle - Output the the handle of the form.
TitleToken - Output the TitleToken of the new page.
FormTags - Output the FormFags of the new page.
-
-Returns:
+
+Returns:
VOID
-
+
--*/
{
UINTN Index;
@@ -1212,7 +1212,7 @@ Returns: );
if (EFI_ERROR (Status)) {
- gBS->FreePool (LocalTags->Tags);
+ FreePool (LocalTags->Tags);
return ;
}
@@ -1317,7 +1317,7 @@ Returns: }
if (Packet != NULL) {
- gBS->FreePool (Packet);
+ FreePool (Packet);
}
for (BackupIndex = 0; LocalTags->Tags[BackupIndex].Operand != EFI_IFR_END_FORM_OP; BackupIndex++) {
@@ -1347,7 +1347,7 @@ Returns: // Delete the buffer associated with previous dynamic page
// We will re-allocate a buffer....
//
- gBS->FreePool (LocalTags->Tags);
+ FreePool (LocalTags->Tags);
Length = 0xF000;
Buffer = AllocateZeroPool (Length);
|