LSan identified some memory that is dropped on the floor in libjli.
libjli accrues options into an array to pass to the JVM. Some of the passed strings are statically allocated and some are dynamically allocated. All dynamically allocated options are leaked and never freed after initializing the JVM.
To resolve this, all options should be strdup'ed and then free'ed after the options are passed to the JVM. Callers allocating dynamic memory would then free the memory after adding the option.
libjli accrues options into an array to pass to the JVM. Some of the passed strings are statically allocated and some are dynamically allocated. All dynamically allocated options are leaked and never freed after initializing the JVM.
To resolve this, all options should be strdup'ed and then free'ed after the options are passed to the JVM. Callers allocating dynamic memory would then free the memory after adding the option.
- links to
-
Review openjdk/jdk/11384