Skip to content

Commit b37da1e

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 a9d9208 commit b37da1e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/port/win32env.c

Lines changed: 0 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy