summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-26 09:22:38 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-26 09:22:38 +0000
commit0322ed7af8a739263fd27e5ae1862b2b8f7137a5 (patch)
tree78038dd0397398e00d79920f08f7341a0ceacff1 /MdeModulePkg/Universal/Console
parente15c65a371286026d80fab12a8382f901adf059f (diff)
downloadedk2-platforms-0322ed7af8a739263fd27e5ae1862b2b8f7137a5.tar.xz
Check Library usage.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7141 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console')
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 407eefb5ba..eaf13d4229 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -763,10 +763,12 @@ CheckModeSupported (
EFI_STATUS Status;
UINTN SizeOfInfo;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
+ UINT32 MaxMode;
- Status = EFI_SUCCESS;
-
- for (ModeNumber = 0; ModeNumber < GraphicsOutput->Mode->MaxMode; ModeNumber++) {
+ Status = EFI_SUCCESS;
+ MaxMode = GraphicsOutput->Mode->MaxMode;
+
+ for (ModeNumber = 0; ModeNumber < MaxMode; ModeNumber++) {
Status = GraphicsOutput->QueryMode (
GraphicsOutput,
ModeNumber,
@@ -778,11 +780,11 @@ CheckModeSupported (
(Info->VerticalResolution == VerticalResolution)) {
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
if (!EFI_ERROR (Status)) {
- gBS->FreePool (Info);
+ FreePool (Info);
break;
}
}
- gBS->FreePool (Info);
+ FreePool (Info);
}
}