On Wed, 29 Jul 2026 15:03:51 GMT, Matthias Baesken <[email protected]> wrote:

> Testing new MSVC warning flags 
> ([JDK-8388932](https://bugs.openjdk.org/browse/JDK-8388932)) revealed some 
> local initialized unused variables in jdk.accessibility.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

I think there is no need for the unused
`bool freeData = false;`
because we simply should always dynamically allocate the buffers in question 
(and of course always free them after usage).
Btw. seems `printVersion()` leaks data too 
https://github.com/openjdk/jdk/blob/4a9fba615da0dfa6646ecb9fd9d929f74fe6875e/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp#L299C11-L299C23
So all the usages of new in this file need updating.

So I would say just integrate this PR, but right afterwards fix the new/delete 
issues in this file (I would be okay to prepare a follow up PR for this, 
because no one seems to work atm. on the existing issue  
[JDK-8348872](https://bugs.openjdk.org/browse/JDK-8348872) ).

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

PR Comment: https://git.openjdk.org/jdk/pull/32088#issuecomment-5165476115

Reply via email to