RFR: JDK-8297688: libjli leaks memory related to options handling [v3]
Justin King
jcking at openjdk.org
Mon Nov 28 09:10:29 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:
Remove unnecessary NULL assignment in FreeOptions
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/564d1733..dc9b0be6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11384&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11384&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 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