-
Bug
-
Resolution: Unresolved
-
P3
-
8u65, 9
-
b61
-
windows
The code in `regEnable` [1] and `regDeleteValue` [2] functions allocate newStr to format data and then write the data to registry but the `delete[]` operator is never called for `newStr`.
The bug is found during code review [3] for JDK-8342870.
[1] https://github.com/openjdk/jdk/blob/4a9fba615da0dfa6646ecb9fd9d929f74fe6875e/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp#L352
[2] https://github.com/openjdk/jdk/blob/4a9fba615da0dfa6646ecb9fd9d929f74fe6875e/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp#L396
[3] https://github.com/openjdk/jdk/pull/21656#discussion_r1923752261
The bug is found during code review [3] for JDK-8342870.
[1] https://github.com/openjdk/jdk/blob/4a9fba615da0dfa6646ecb9fd9d929f74fe6875e/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp#L352
[2] https://github.com/openjdk/jdk/blob/4a9fba615da0dfa6646ecb9fd9d929f74fe6875e/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp#L396
[3] https://github.com/openjdk/jdk/pull/21656#discussion_r1923752261
- relates to
-
JDK-8348872 jabswitch.cpp: regEnable and regDeleteValue leak reallocated data buffer
-
- Open
-