projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90d5828
)
drisw: Fix shared memory leak on drawable resize
author
Andreas Gottschling
<andreasgottschling@outlook.de>
Fri, 27 Sep 2019 16:02:06 +0000
(12:02 -0400)
committer
Adam Jackson
<ajax@nwnk.net>
Fri, 27 Sep 2019 16:06:05 +0000
(16:06 +0000)
XDestroyImage will mark the segment as to-be-destroyed, but it will
persist until we detach it, and we weren't doing so.
Cc: mesa-stable@lists.freedesktop.org
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/121
Reviewed-by: Adam Jackson <ajax@redhat.com>
src/glx/drisw_glx.c
patch
|
blob
|
history
diff --git
a/src/glx/drisw_glx.c
b/src/glx/drisw_glx.c
index 45a61e654c772d72e6b614a3bb5c245d4c0c0d31..3bf15322ff85e1397aa3174a308a870c50ec4756 100644
(file)
--- a/
src/glx/drisw_glx.c
+++ b/
src/glx/drisw_glx.c
@@
-56,6
+56,8
@@
XCreateDrawable(struct drisw_drawable * pdp, int shmid, Display * dpy)
if (pdp->ximage) {
XDestroyImage(pdp->ximage);
pdp->ximage = NULL;
+ if ((pdp->shminfo.shmid > 0) && (shmid != pdp->shminfo.shmid))
+ XShmDetach(dpy, &pdp->shminfo);
}
if (!xshm_error && shmid >= 0) {