Commit 4c1e554d authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wintrust: Close file handle on error loading a message from it.

parent dce2a459
......@@ -364,6 +364,14 @@ static DWORD SOFTPUB_LoadFileMessage(CRYPT_PROVIDER_DATA *data)
err = SOFTPUB_DecodeInnerContent(data);
error:
if (err && data->fOpenedFile && data->pWintrustData->u.pFile)
{
/* The caller won't expect the file to be open on failure, so close it.
*/
CloseHandle(data->pWintrustData->u.pFile->hFile);
data->pWintrustData->u.pFile->hFile = INVALID_HANDLE_VALUE;
data->fOpenedFile = FALSE;
}
return err;
}
......
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