RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

Alexey Ivanov aivanov at openjdk.org
Tue Jan 28 17:37:50 UTC 2025


On Fri, 24 Jan 2025 20:34:26 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp line 364:
>> 
>>> 362: }
>>> 363: 
>>> 364: int regDeleteValue(HKEY hFamilyKey, LPCWSTR lpSubKey)
>> 
>> There's one more memory leak:
>> 
>> https://github.com/openjdk/jdk/blob/4a9fba615da0dfa6646ecb9fd9d929f74fe6875e/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp#L352
>> 
>> The `delete[]` operator must be called on `newStr`.
>> 
>> It's present in both `regEnable` and `regDeleteValue`.
>
> I'll also submit a new bug against it.

I submitted [JDK-8348876](https://bugs.openjdk.org/browse/JDK-8348876): _jabswitch.cpp: regEnable and regDeleteValue leak newStr_

I assigned both bugs to myself, feel free to re-assign if you're going to address the issues.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21656#discussion_r1932599379


More information about the client-libs-dev mailing list