public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] MdeModulePkg: Fix a typo
@ 2022-06-01  2:20 zhangshuzhen
  2022-06-02  2:17 ` 回复: [edk2-devel] " gaoliming
  0 siblings, 1 reply; 2+ messages in thread
From: zhangshuzhen @ 2022-06-01  2:20 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

Correctly write 'DstBufAllocated' in CoreLoadPeImage().

Signed-off-by: Zhang Shuzhen <zhangshuzhen@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

[-- Attachment #2: Type: text/html, Size: 2205 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-02  2:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-01  2:20 [PATCH 1/1] MdeModulePkg: Fix a typo zhangshuzhen
2022-06-02  2:17 ` 回复: [edk2-devel] " gaoliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox