Commit dfb64699 authored by Andrey Turkin's avatar Andrey Turkin Committed by Alexandre Julliard

wordpad: Do not leak a handle on error path.

parent ef23ef93
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment