RFR: JDK-8292595: jdwp utf_util getWideString might leak memory

Alan Bateman alanb at openjdk.org
Thu Aug 18 12:56:16 UTC 2022


On Thu, 18 Aug 2022 12:42:48 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Another MultiByteToWideChar / malloc case I just saw
> https://github.com/openjdk/jdk/blob/master/src/java.instrument/windows/native/libinstrument/EncodingSupport_md.c#L79
> shouldn't there be the free call after line 80 ?

I think you are right, it won't free if MultiByteToWideChar were to fail.

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

PR: https://git.openjdk.org/jdk/pull/9918


More information about the serviceability-dev mailing list