Author: gschneider
Date: Tue Aug 18 16:43:47 2009
New Revision: 42767
URL:
http://svn.reactos.org/svn/reactos?rev=42767&view=rev
Log:
Check the correct buffer for failed memory allocation, found by Amine Khaldi
Modified:
trunk/reactos/dll/win32/kernel32/file/move.c
Modified: trunk/reactos/dll/win32/kernel32/file/move.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/mo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/move.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/move.c [iso-8859-1] Tue Aug 18 16:43:47 2009
@@ -405,7 +405,7 @@
}
lpExistingFileName2 = (LPWSTR) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,max_size
* sizeof(WCHAR));
- if (lpNewFileName2 == NULL)
+ if (lpExistingFileName2 == NULL)
{
HeapFree(GetProcessHeap(),0,(VOID *) lpNewFileName2);
HeapFree(GetProcessHeap(),0,(VOID *) lpDeleteFile);