RFR: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata
Mario Torre
neugens at openjdk.java.net
Mon Apr 11 13:29:48 UTC 2022
On Thu, 31 Mar 2022 13:30:40 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> Please review this small patch to fix leaking `XShmSegmentInfo` that is attached to `XImage`.
>
> Test:
>
> - [x] jdk_2d
I'm not officially a reviewer but afaik there isn't any other place where the obdata is freed, and X11SD_DropSharedSegment doesn't do it, so we probably need to do it there. Since obdata is malloced in X11SD_CreateSharedImage, it seems correct to free it in X11SD_DisposeXImage (instead of directly within X11SD_DropSharedSegment), so the patch looks good to me.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8060
More information about the client-libs-dev
mailing list