changeset 6689:f34359d2e987

6987461: Handle leak when enabling java.net.useSystemProxies Summary: Release the registry key handle if ProxyEnable is 0 Reviewed-by: michaelm
author chegar
date Wed, 29 Sep 2010 17:33:17 +0100
parents 74c17eb999d2
children 7e7d18be1370
files jdk/src/windows/native/sun/net/spi/DefaultProxySelector.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/windows/native/sun/net/spi/DefaultProxySelector.c	Wed Sep 29 15:26:59 2010 +0800
+++ b/jdk/src/windows/native/sun/net/spi/DefaultProxySelector.c	Wed Sep 29 17:33:17 2010 +0100
@@ -250,6 +250,10 @@
           return proxy;
         }
       }
+    } else {
+      /* ProxyEnable == 0 or Query failed      */
+      /* close the handle to the registry key  */
+      RegCloseKey(hKey);
     }
   }