[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8266187: Memory leak in appendBootClassPath()
From:       Alan Bateman <alanb () openjdk ! java ! net>
Date:       2021-04-30 16:39:50
Message-ID: NZAiRa73Gh_K9qeX8VsodvEdwOswFGfIGY1DXWm9EL4=.a23d1c6f-f9bd-49da-901c-910965d033e1 () github ! com
[Download RAW message or body]

On Wed, 28 Apr 2021 06:38:57 GMT, Wang Huang <whuang@openjdk.org> wrote:

> Dear All, 
> I find a memory leak in `appendBootClassPath()`
> https://github.com/openjdk/jdk/blob/75a2354dc276e107d64516d20fc72bc7ef3d5f86/src/java.instrument/share/native/libinstrument/InvocationAdapter.c#L950
>                 
> * we malloc `resolved` from resolve(parent, path)
> * we use `resolved` in line 951 
> * we don't free() this memory after using.
> 
> I think we can fix this bug by adding a free() after line 951 as my commit.
> Thank you for your review. Any suggestion is welcome.
> 
> Yours , 
> Wang Huang

Marked as reviewed by alanb (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/3751


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic