diff options
author | Noah Misch | 2016-12-03 20:46:35 +0000 |
---|---|---|
committer | Noah Misch | 2016-12-03 20:46:35 +0000 |
commit | b37da1e8a0e46ae12415fafd3ea441fc3546cf2f (patch) | |
tree | e3d153eb4ea0103e8786e99a9bf3db4c547f3f59 /src/port/win32env.c | |
parent | a9d9208c15de4933f89e5b6ac1d9ef0efd299162 (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.
Diffstat (limited to 'src/port/win32env.c')
-rw-r--r-- | src/port/win32env.c | 1 |
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; } |