[OpenJDK 2D-Dev] RFR: 8263893: getPrinterNames() leaks nameArray if Java String allocation fails
Alexander Zvegintsev
azvegint at openjdk.java.net
Fri Mar 19 21:58:41 UTC 2021
On Fri, 19 Mar 2021 20:36:57 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> If `JNU_NewStringPlatform` fails to allocate new Java String object for printer name, `std::bad_alloc` is thrown. The handler for the exception does not release the local reference to the `nameArray`, thus it will be leaked.
Marked as reviewed by azvegint (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/3096
More information about the 2d-dev
mailing list