- Properly free a buffer allocated during "copy" command. Fixes cmd.exe crash when copy operation experiences a write error or is being interrupted with a Ctrl+C keypress.

svn path=/trunk/; revision=39684
This commit is contained in:
Aleksey Bragin 2009-02-19 12:51:57 +00:00
parent c52fd56034
commit 16df5c0cb7

View file

@ -232,7 +232,7 @@ copy (TCHAR source[MAX_PATH],
{
ConOutResPuts(STRING_COPY_ERROR3);
cmd_free (buffer);
VirtualFree (buffer, 0, MEM_RELEASE);
CloseHandle (hFileDest);
CloseHandle (hFileSrc);
nErrorLevel = 1;