wordpad: Do not leak a handle on error path.

This commit is contained in:
Andrey Turkin 2008-10-12 15:09:45 +04:00 committed by Alexandre Julliard
parent ef23ef9335
commit dfb64699bf

View File

@ -810,7 +810,10 @@ static void DoSaveFile(LPCWSTR wszSaveFileName, WPARAM format)
WriteFile(hFile, &unicode, sizeof(unicode), &writeOut, 0); WriteFile(hFile, &unicode, sizeof(unicode), &writeOut, 0);
if(writeOut != sizeof(unicode)) if(writeOut != sizeof(unicode))
{
CloseHandle(hFile);
return; return;
}
} }
stream.dwCookie = (DWORD_PTR)hFile; stream.dwCookie = (DWORD_PTR)hFile;