Index: Library/UefiShellLevel2CommandsLib/Cp.c
===================================================================
--- Library/UefiShellLevel2CommandsLib/Cp.c	(revision 16128)
+++ Library/UefiShellLevel2CommandsLib/Cp.c	(working copy)
@@ -486,7 +486,7 @@
         StrnCat(DestPath, Node->FileName, PathSize/sizeof(CHAR16) - StrLen(DestPath) -1);
       }
     }
-    FreePool (CleanFilePathStr);
+    
     //
     // Make sure the path exists
     //
@@ -539,6 +539,7 @@
   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);
   }
