Commit 8118131f authored by Andreas Gottschling's avatar Andreas Gottschling Committed by Juan Suárez Romero

drisw: Fix shared memory leak on drawable resize

XDestroyImage will mark the segment as to-be-destroyed, but it will
persist until we detach it, and we weren't doing so.

Gitlab: #121Reviewed-by: Adam Jackson's avatarAdam Jackson <>
(cherry picked from commit c5a2ccec)
parent 950d1670
......@@ -86,6 +86,8 @@ XCreateDrawable(struct drisw_drawable * pdp, int shmid, Display * dpy)
if (pdp->ximage) {
pdp->ximage = NULL;
if ((pdp->shminfo.shmid > 0) && (shmid != pdp->shminfo.shmid))
XShmDetach(dpy, &pdp->shminfo);
if (!xshm_error && shmid >= 0) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment