Commit eee39b12 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

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

parent 20093556
...@@ -967,7 +967,8 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL, ...@@ -967,7 +967,8 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
/* We don't set ret to TRUE in this block to avoid masking /* We don't set ret to TRUE in this block to avoid masking
* an error from HttpSendRequestExW. * 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) GetLastError() == ERROR_IO_PENDING)
{ {
if (WaitForSingleObject(context->event, if (WaitForSingleObject(context->event,
......
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