From fb9bb4c57c99a2446397b04622164804bd29d4cc Mon Sep 17 00:00:00 2001
From: Christian Ullrich <chris@chrullrich.net>
Date: Wed, 16 Nov 2016 16:11:27 +0100
Subject: [PATCH] Remove unnecessary CloseHandle() call.

An HMODULE from GetModuleHandle() does not need closing.
---
 src/port/win32env.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/port/win32env.c b/src/port/win32env.c
index 478ec1d..5aaf100 100644
--- a/src/port/win32env.c
+++ b/src/port/win32env.c
@@ -80,7 +80,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;
 					}
-- 
2.10.2.windows.1

