cryptnet: Don't call HttpEndRequest on a request that was never sent.

oldstable
Juan Lang 2012-02-18 19:08:45 -08:00 committed by Alexandre Julliard
parent 20093556f9
commit eee39b12ab
1 changed files with 2 additions and 1 deletions

View File

@ -967,7 +967,8 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
/* We don't set ret to TRUE in this block to avoid masking
* an error from HttpSendRequestExW.
*/
if (!HttpEndRequestW(hHttp, NULL, 0, (DWORD_PTR)context) &&
if (ret &&
!HttpEndRequestW(hHttp, NULL, 0, (DWORD_PTR)context) &&
GetLastError() == ERROR_IO_PENDING)
{
if (WaitForSingleObject(context->event,