We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee32c22 commit beec32dCopy full SHA for beec32d
Win32.xs
@@ -1697,7 +1697,7 @@ XS(w32_HttpGetFile)
1697
HINTERNET hSession = NULL,
1698
hConnect = NULL,
1699
hRequest = NULL;
1700
- HANDLE hOut = NULL;
+ HANDLE hOut = INVALID_HANDLE_VALUE;
1701
BOOL bParsed = FALSE,
1702
bAborted = FALSE,
1703
bFileError = FALSE,
@@ -1935,7 +1935,7 @@ XS(w32_HttpGetFile)
1935
(void) DeleteFileW(file);
1936
1937
/* Close any open handles. */
1938
- if (hOut) CloseHandle(hOut);
+ if (hOut != INVALID_HANDLE_VALUE) CloseHandle(hOut);
1939
if (hRequest) WinHttpCloseHandle(hRequest);
1940
if (hConnect) WinHttpCloseHandle(hConnect);
1941
if (hSession) WinHttpCloseHandle(hSession);
0 commit comments