Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 056d62c

Browse files
committed
Remove wrong CloseHandle() call.
In accordance with its own documentation, invoke CloseHandle() only when directed in the documentation for the function that furnished the handle. GetModuleHandle() does not so direct. We have been issuing this call only in the rare event that a CRT DLL contains no "_putenv" symbol, so lack of bug reports is uninformative. Back-patch to 9.2 (all supported versions). Christian Ullrich, reviewed by Michael Paquier.
1 parent d66dcb4 commit 056d62c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/port/win32env.c

-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ pgwin32_putenv(const char *envval)
9292
rtmodules[i].putenvFunc = (PUTENVPROC) GetProcAddress(rtmodules[i].hmodule, "_putenv");
9393
if (rtmodules[i].putenvFunc == NULL)
9494
{
95-
CloseHandle(rtmodules[i].hmodule);
9695
rtmodules[i].hmodule = INVALID_HANDLE_VALUE;
9796
continue;
9897
}

0 commit comments

Comments
 (0)