summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
index a061c97d07..3f4cada2b7 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/MemMap.c
@@ -216,7 +216,8 @@ ShellCommandRunMemMap (
Descriptors = AllocateZeroPool (Size);
if (Descriptors == NULL) {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"memmap");
- ShellStatus = SHELL_OUT_OF_RESOURCES;
+ ShellCommandLineFreeVarList (Package);
+ return SHELL_OUT_OF_RESOURCES;
}
Status = gBS->GetMemoryMap (&Size, Descriptors, &MapKey, &ItemSize, &Version);