RFR: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata

Zhengyu Gu zgu at openjdk.java.net
Mon Apr 11 13:36:53 UTC 2022


On Mon, 11 Apr 2022 13:26:03 GMT, Mario Torre <neugens 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.

Thanks, @neugens @gnu-andrew

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

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



More information about the client-libs-dev mailing list