Fix double-close of connection handle on failure

This commit is contained in:
Cameron Gutman 2020-07-19 10:08:26 -07:00
parent 8d2252c4ac
commit ad8ef228d5

View File

@ -597,7 +597,6 @@ PortTestStatus TestHttpPort(PSOCKADDR_STORAGE addr, int port, bool isLoopbackRel
port == 47984 ? WINHTTP_FLAG_SECURE : 0);
if (hConnection == nullptr) {
fprintf(LOG_OUT, "WinHttpOpenRequest() failed: %d\n", GetLastError());
WinHttpCloseHandle(hConnection);
result = PortTestError;
goto Exit;
}