On Thu, 31 Mar 2022 13:30:40 GMT, Zhengyu Gu <[email protected]> wrote:

> Please review this small patch to fix leaking `XShmSegmentInfo` that is 
> attached to `XImage`. 
> 
> Test:
> 
> - [x] jdk_2d

This looks correct to me.

There is another similar block:

        if (xsdo->shmPMData.shmSegInfo != NULL) {
            X11SD_DropSharedSegment(xsdo->shmPMData.shmSegInfo);
            xsdo->shmPMData.shmSegInfo = NULL;
        }

But `xsdo->shmPMData.shmSegInfo` is assigned `img->obdata` in 
`X11SD_CreateSharedPixmap`, so looks like this is the one and only place to 
free this.

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

Marked as reviewed by andrew (Reviewer).

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

Reply via email to