RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment

Andrew John Hughes andrew at openjdk.java.net
Thu Apr 28 13:17:38 UTC 2022


On Wed, 20 Apr 2022 13:48:19 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> During initializing native data of `X11GraphicsEnvironment`, a single `AwtGraphicsConfigData` is used/reused, not only failed cases, but also succeeded cases. So `AwtGraphicsConfigData` internal states need to be cleanup properly to avoid memory leaks.
> 
> Test:
> - [x] jdk_awt

I see `calloc` calls also for `img_grays` and `awt_Colors`. Is there a reason these aren't freed too?

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

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



More information about the client-libs-dev mailing list