wordpad: Do not leak a handle on error path.
This commit is contained in:
parent
ef23ef9335
commit
dfb64699bf
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user