]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: ShellPkg: Fix the cp fail while coping directory.
authorNi Ruiyu <ruiyu.ni@intel.com>
Fri, 19 Sep 2014 01:39:45 +0000 (01:39 +0000)
committershenshushi <shenshushi@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Sep 2014 01:39:45 +0000 (01:39 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ni Ruiyu <ruiyu.ni@intel.com>
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16148 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c

index efc14085c3a08621a833a3ce49f41d9de6fec88e..63808424b073b5c50b0fec4a7d1cd1cfef60126c 100644 (file)
@@ -487,7 +487,7 @@ ValidateAndCopyFiles(
         StrnCat(DestPath, Node->FileName, PathSize/sizeof(CHAR16) - StrLen(DestPath) -1);\r
       }\r
     }\r
-    FreePool (CleanFilePathStr);\r
+    \r
     //\r
     // Make sure the path exists\r
     //\r
@@ -540,6 +540,7 @@ ValidateAndCopyFiles(
   SHELL_FREE_NON_NULL(DestPath);\r
   SHELL_FREE_NON_NULL(HiiOutput);\r
   SHELL_FREE_NON_NULL(HiiResultOk);\r
+  SHELL_FREE_NON_NULL(CleanFilePathStr);\r
   if (Resp == NULL) {\r
     SHELL_FREE_NON_NULL(Response);\r
   }\r