summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch2016-12-03 20:46:35 +0000
committerNoah Misch2016-12-03 20:46:35 +0000
commitb37da1e8a0e46ae12415fafd3ea441fc3546cf2f (patch)
treee3d153eb4ea0103e8786e99a9bf3db4c547f3f59
parenta9d9208c15de4933f89e5b6ac1d9ef0efd299162 (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 621ec8d67f..188215876b 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;
}