On Wed, 7 Oct 2026 13:58:07 GMT, Daniel Fuchs <[email protected]> wrote:

>> DefaultProxySelector.c creates a handle 'session' in the initialization 
>> process, but misses to close it in case the initialization process fails.
>> 
>> In case of a successful initialization process, we seem to keep the handle 
>> too and do not close it but this might be okay (?) .
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/java.base/windows/native/libnet/DefaultProxySelector.c line 68:
> 
>> 66: 
>> 67:     if (!initJavaClass(env)) {
>> 68:         WinHttpCloseHandle(session);
> 
> Should `session` be returned to `NULL` after freeing it here?

You mean, session should be set to NULL?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33231#discussion_r4207892736

Reply via email to