mirror of https://github.com/acidanthera/audk.git
Put free the buffer GraphicsOutput.Mode in correct place.
Signed-off-by: li-elvin Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12065 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
fbf82a2cf2
commit
af00cab88d
|
@ -711,6 +711,19 @@ BiosVideoChildHandleInstall (
|
|||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Free GOP mode structure if it is not freed before
|
||||
// VgaMiniPort does not need this structure any more
|
||||
//
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
BiosVideoPrivate->GraphicsOutput.Mode->Info = NULL;
|
||||
}
|
||||
FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
BiosVideoPrivate->GraphicsOutput.Mode = NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Neither VBE nor the standard 640x480 16 color VGA mode are supported, so do
|
||||
// not produce the Graphics Output protocol. Instead, produce the VGA MiniPort Protocol.
|
||||
|
@ -993,8 +1006,10 @@ BiosVideoDeviceReleaseResource (
|
|||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
BiosVideoPrivate->GraphicsOutput.Mode->Info = NULL;
|
||||
}
|
||||
FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
BiosVideoPrivate->GraphicsOutput.Mode = NULL;
|
||||
}
|
||||
//
|
||||
// Free EDID discovered protocol occupied resource
|
||||
|
@ -1634,14 +1649,6 @@ Done:
|
|||
BiosVideoPrivate->ModeData = NULL;
|
||||
BiosVideoPrivate->MaxMode = 0;
|
||||
}
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode != NULL) {
|
||||
if (BiosVideoPrivate->GraphicsOutput.Mode->Info != NULL) {
|
||||
FreePool (BiosVideoPrivate->GraphicsOutput.Mode->Info);
|
||||
BiosVideoPrivate->GraphicsOutput.Mode->Info = NULL;
|
||||
}
|
||||
FreePool (BiosVideoPrivate->GraphicsOutput.Mode);
|
||||
BiosVideoPrivate->GraphicsOutput.Mode= NULL;
|
||||
}
|
||||
if (EdidOverrideDataBlock != NULL) {
|
||||
FreePool (EdidOverrideDataBlock);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue