RFR: JDK-8297688: libjli leaks memory related to options handling [v2]
Justin King
jcking at openjdk.org
Mon Nov 28 09:07:44 UTC 2022
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in strings, taking ownership. Callers using dynamic memory free their storage after calling `AddOption`. This ensures no memory is dropped on the floor. This also removes the second argument to `AddOption` as it is unused and shifts it into the source file.
Justin King has updated the pull request incrementally with one additional commit since the last revision:
Maintain separate list of dynamically allocated option strings
Signed-off-by: Justin King <jcking at google.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11384/files
- new: https://git.openjdk.org/jdk/pull/11384/files/cbd06fda..564d1733
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11384&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11384&range=00-01
Stats: 48 lines in 1 file changed: 26 ins; 9 del; 13 mod
Patch: https://git.openjdk.org/jdk/pull/11384.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11384/head:pull/11384
PR: https://git.openjdk.org/jdk/pull/11384
More information about the core-libs-dev
mailing list