Module: Mesa Branch: master Commit: b344e32cdf7064a1f2ff7ef37027edda6589404f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b344e32cdf7064a1f2ff7ef37027edda6589404f
Author: Ray Zhang <[email protected]> Date: Wed Feb 27 06:54:05 2019 +0000 glx: fix shared memory leak in X11 call XShmDetach to allow X server to free shared memory Fixes: bcd80be49a8260c2233d "drisw/glx: use XShm if possible" Signed-off-by: Ray Zhang <[email protected]> Reviewed-by: Dave Airlie <[email protected]> --- src/glx/drisw_glx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 00c7fa100ab..48c03ca42e0 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -147,6 +147,9 @@ XDestroyDrawable(struct drisw_drawable * pdp, Display * dpy, XID drawable) if (pdp->ximage) XDestroyImage(pdp->ximage); + if (pdp->shminfo.shmid > 0) + XShmDetach(dpy, &pdp->shminfo); + free(pdp->visinfo); XFreeGC(dpy, pdp->gc); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
