Correctly write 'DstBufAllocated' in CoreLoadPeImage().

Signed-off-by: Zhang Shuzhen <zhangshuz...@greatwall.com.cn>
---
MdeModulePkg/Core/Dxe/Image/Image.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c 
b/MdeModulePkg/Core/Dxe/Image/Image.c
index 68bde5c15c..5bdf96b52c 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -581,7 +581,7 @@ CoreLoadPeImage (
)
{
EFI_STATUS  Status;
-  BOOLEAN     DstBufAlocated;
+  BOOLEAN     DstBufAllocated;
UINTN       Size;

ZeroMem (&Image->ImageContext, sizeof (Image->ImageContext));
@@ -636,7 +636,7 @@ CoreLoadPeImage (
//
// Allocate memory of the correct memory type aligned on the required image 
boundary
//
-  DstBufAlocated = FALSE;
+  DstBufAllocated = FALSE;
if (DstBuffer == 0) {
//
// Allocate Destination Buffer as caller did not pass it in
@@ -702,7 +702,7 @@ CoreLoadPeImage (
return Status;
}

-    DstBufAlocated = TRUE;
+    DstBufAllocated = TRUE;
} else {
//
// Caller provided the destination buffer
@@ -884,7 +884,7 @@ Done:
// Free memory.
//

-  if (DstBufAlocated) {
+  if (DstBufAllocated) {
CoreFreePages (Image->ImageContext.ImageAddress, Image->NumberOfPages);
Image->ImageContext.ImageAddress = 0;
Image->ImageBasePage             = 0;
--
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#90128): https://edk2.groups.io/g/devel/message/90128
Mute This Topic: https://groups.io/mt/91477067/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to