summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2016-12-03 15:46:35 -0500
committerNoah Misch <noah@leadboat.com>2016-12-03 15:46:42 -0500
commit056d62c5e5bd5c3c70952aa9e361fe7d7ea26d66 (patch)
tree97944787ccfe635c4633a3ae89b2a787b0a391ca
parentd66dcb4ca5553c43149a876265aebeb58076c0f1 (diff)
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.
-rw-r--r--src/port/win32env.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/port/win32env.c b/src/port/win32env.c
index 621ec8d67f2..188215876bb 100644
--- a/src/port/win32env.c
+++ b/src/port/win32env.c
@@ -92,7 +92,6 @@ pgwin32_putenv(const char *envval)
rtmodules[i].putenvFunc = (PUTENVPROC) GetProcAddress(rtmodules[i].hmodule, "_putenv");
if (rtmodules[i].putenvFunc == NULL)
{
- CloseHandle(rtmodules[i].hmodule);
rtmodules[i].hmodule = INVALID_HANDLE_VALUE;
continue;
}