Author: pschweitzer
Date: Tue Sep 15 11:14:58 2015
New Revision: 69241
URL:
http://svn.reactos.org/svn/reactos?rev=69241&view=rev
Log:
[CMD]
- Fix a broken check
- Plug a memory leak
Modified:
trunk/reactos/base/shell/cmd/replace.c
Modified: trunk/reactos/base/shell/cmd/replace.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/replace.c?r…
==============================================================================
--- trunk/reactos/base/shell/cmd/replace.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/replace.c [iso-8859-1] Tue Sep 15 11:14:58 2015
@@ -100,9 +100,10 @@
hFileDest = CreateFile(dest, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING,
0, NULL);
- if (hFileSrc == INVALID_HANDLE_VALUE)
+ if (hFileDest == INVALID_HANDLE_VALUE)
{
ConOutResPrintf(STRING_COPY_ERROR1, dest);
+ CloseHandle (hFileSrc);
return 0;
}