wordpad: Do not leak a handle on error path.

oldstable
Andrey Turkin 2008-10-12 15:09:45 +04:00 committed by Alexandre Julliard
parent ef23ef9335
commit dfb64699bf
1 changed files with 3 additions and 0 deletions

View File

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