RFR: 8261154: Memory leak in Java_java_lang_ClassLoader_defineClass0 with long class names [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Thu Feb 4 17:00:41 UTC 2021
On Thu, 4 Feb 2021 15:53:24 GMT, Claes Redestad <redestad at openjdk.org> wrote:
> I'm not sure every platform have always agreed free(NULL) is a noop. I suspect all the currently supported ones do, though?
Its standard behavior.
Posix: https://pubs.opengroup.org/onlinepubs/009695399/functions/free.html "If ptr is a null pointer, no action shall occur. "
Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/free?view=msvc-160 " If memblock is NULL, the pointer is ignored and free immediately returns. "
So it should be okay.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2407
More information about the core-libs-dev
mailing list