aboutsummaryrefslogtreecommitdiff
path: root/src
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:35 -0500
commitb37da1e8a0e46ae12415fafd3ea441fc3546cf2f (patch)
treee3d153eb4ea0103e8786e99a9bf3db4c547f3f59 /src
parenta9d9208c15de4933f89e5b6ac1d9ef0efd299162 (diff)
downloadpostgresql-b37da1e8a0e46ae12415fafd3ea441fc3546cf2f.tar.gz
postgresql-b37da1e8a0e46ae12415fafd3ea441fc3546cf2f.zip
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.
Diffstat (limited to 'src')
-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;
}