RFR: 8303070: Memory leak in DCmdArgument<char*>::parse_value [v2]

David Holmes dholmes at openjdk.org
Sat Feb 25 02:36:36 UTC 2023


On Fri, 24 Feb 2023 23:10:59 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I have the same question.  Why don't we call free if _value is non-null?
>
> Not sure str can ever actually be null here, but if it is then yes we should also free. Thanks for catching that.

Turns out it is trivially easy for it to be null - just pass a settable option that doesn't have "=x". Test has been updated to cover missing cases.

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

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


More information about the hotspot-runtime-dev mailing list