6987461: Handle leak when enabling java.net.useSystemProxies

Release the registry key handle if ProxyEnable is 0

Reviewed-by: michaelm
This commit is contained in:
Chris Hegarty 2010-09-29 17:33:17 +01:00
parent b1bd74bb7d
commit 674e1ca1c7

View File

@ -250,6 +250,10 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxy(JNIEnv *env,
return proxy;
}
}
} else {
/* ProxyEnable == 0 or Query failed */
/* close the handle to the registry key */
RegCloseKey(hKey);
}
}