From a6e84d95f50a10e23ee9861270fb84057b5af2e9 Mon Sep 17 00:00:00 2001 From: Ni Ruiyu Date: Fri, 19 Sep 2014 01:39:45 +0000 Subject: ShellPkg: ShellPkg: Fix the cp fail while coping directory. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ni Ruiyu Signed-off-by: Qiu Shumin Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16148 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ShellPkg/Library') diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c index efc14085c3..63808424b0 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); } -- cgit v1.2.3