mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 10:10:14 +01:00
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.
Cc: mesa-stable@lists.freedesktop.org
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/121
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit c5a2ccec5e)
This commit is contained in:
parent
dc0995669d
commit
db1ed17ac4
1 changed files with 2 additions and 0 deletions
|
|
@ -86,6 +86,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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue