Initialize the local variable before refer to them.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10577 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -188,6 +188,7 @@ Returns:
|
||||
//
|
||||
// For now, allocate an arbitrarily long buffer
|
||||
//
|
||||
BufferLen = 0;
|
||||
Buffer = EfiLibAllocateZeroPool (0x10000);
|
||||
if (Buffer == NULL) {
|
||||
return 0;
|
||||
@@ -428,14 +429,15 @@ Returns:
|
||||
|
||||
Handle = gST->ConsoleOutHandle;
|
||||
|
||||
GraphicsOutput = NULL;
|
||||
UgaDraw = NULL;
|
||||
Status = gBS->HandleProtocol (
|
||||
Handle,
|
||||
&gEfiGraphicsOutputProtocolGuid,
|
||||
(VOID**)&GraphicsOutput
|
||||
);
|
||||
|
||||
UgaDraw = NULL;
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR (Status) || (GraphicsOutput == NULL)) {
|
||||
GraphicsOutput = NULL;
|
||||
|
||||
Status = gBS->HandleProtocol (
|
||||
|
Reference in New Issue
Block a user