changeset 2965:570f825ad872

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 26c6ee936f63
children 1fe397df4aaa
files src/windows/native/sun/net/spi/DefaultProxySelector.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/net/spi/DefaultProxySelector.c	Wed Sep 29 15:26:59 2010 +0800
+++ b/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);
     }
   }