Check the correct buffer for failed memory allocation, found by Amine Khaldi

svn path=/trunk/; revision=42767
This commit is contained in:
Gregor Schneider 2009-08-18 14:43:47 +00:00
parent 332c985b52
commit 6af2bfe3c7

View file

@ -405,7 +405,7 @@ MoveFileWithProgressW (
}
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);