X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDebugSupportDxe%2FDebugSupport.c;h=349a932b0652d9014f2b6920b07b159acf236aad;hp=1a03ba4657a1b77947c7e449227e5c00c114bf54;hb=HEAD;hpb=9d510e61fceee7b92955ef9a3c20343752d8ce3f diff --git a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c index 1a03ba4657..349a932b06 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c +++ b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c @@ -16,7 +16,6 @@ EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupportProtocolInterface = { InvalidateInstructionCache }; - /** Debug Support Driver entry point. @@ -34,8 +33,8 @@ EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupportProtocolInterface = { EFI_STATUS EFIAPI InitializeDebugSupportDriver ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolPtr; @@ -63,7 +62,7 @@ InitializeDebugSupportDriver ( Status = gBS->OpenProtocol ( HandlePtr[NumHandles], &gEfiDebugSupportProtocolGuid, - (VOID **) &DebugSupportProtocolPtr, + (VOID **)&DebugSupportProtocolPtr, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL @@ -77,6 +76,7 @@ InitializeDebugSupportDriver ( goto ErrExit; } } while (NumHandles > 0); + FreePool (HandlePtr); } @@ -86,7 +86,7 @@ InitializeDebugSupportDriver ( Status = gBS->OpenProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - (VOID **) &LoadedImageProtocolPtr, + (VOID **)&LoadedImageProtocolPtr, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL