summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index 933b245036..b9fe70332e 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -636,6 +636,11 @@ CustomGuidedSectionExtract (
ScratchBuffer,
AuthenticationStatus
);
+
+ if (ScratchBuffer != NULL) {
+ FreePages (ScratchBuffer, EFI_SIZE_TO_PAGES (ScratchBufferSize));
+ }
+
if (EFI_ERROR (Status)) {
//
// Decode failed