summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
index efc14085c..63808424b 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
@@ -487,7 +487,7 @@ ValidateAndCopyFiles(
StrnCat(DestPath, Node->FileName, PathSize/sizeof(CHAR16) - StrLen(DestPath) -1);
}
}
- FreePool (CleanFilePathStr);
+
//
// Make sure the path exists
//
@@ -540,6 +540,7 @@ ValidateAndCopyFiles(
SHELL_FREE_NON_NULL(DestPath);
SHELL_FREE_NON_NULL(HiiOutput);
SHELL_FREE_NON_NULL(HiiResultOk);
+ SHELL_FREE_NON_NULL(CleanFilePathStr);
if (Resp == NULL) {
SHELL_FREE_NON_NULL(Response);
}