From eee39b12abc92cffdfbc6923a01cb174b4631b60 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Sat, 18 Feb 2012 19:08:45 -0800 Subject: [PATCH] cryptnet: Don't call HttpEndRequest on a request that was never sent. --- dlls/cryptnet/cryptnet_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c index 5d063968974..31436045a5f 100644 --- a/dlls/cryptnet/cryptnet_main.c +++ b/dlls/cryptnet/cryptnet_main.c @@ -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,