mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2026-02-16 10:30:56 +00:00
Fix double-close of connection handle on failure
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user