RFR: 8282628: Potential memory leak in sun.font.FontConfigManager.getFontConfig() [v2]
Sergey Bylokhov
serb at openjdk.java.net
Tue Mar 8 20:16:04 UTC 2022
On Tue, 8 Mar 2022 13:37:44 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> ??? You want to check and cleanup if NewStringUTF fails. You only want to call SetObjectElementArray if NewStringUTF succeeds.
>
> Can `SetObjectElementArray` raise an exception?
> The index is within the array length and we store a string. I assume `cacheDirArray` is a string array.
> ??? You want to check and cleanup if NewStringUTF fails. You only want to call SetObjectElementArray if NewStringUTF succeeds.
If the SetObjectArrayElement will throw an exception we will call the NewStringUTF while the exception is raised which is a kind of "jni" issue. If such an exception is possible we should check and cleanup.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7691
More information about the core-libs-dev
mailing list