mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2026-06-18 22:51:12 +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);
|
port == 47984 ? WINHTTP_FLAG_SECURE : 0);
|
||||||
if (hConnection == nullptr) {
|
if (hConnection == nullptr) {
|
||||||
fprintf(LOG_OUT, "WinHttpOpenRequest() failed: %d\n", GetLastError());
|
fprintf(LOG_OUT, "WinHttpOpenRequest() failed: %d\n", GetLastError());
|
||||||
WinHttpCloseHandle(hConnection);
|
|
||||||
result = PortTestError;
|
result = PortTestError;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user