On Tue, 6 Oct 2026 14:43:20 GMT, Matthias Baesken <[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?

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

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

Reply via email to