Browse Source

glx: fix shared memory leak in X11

call XShmDetach to allow X server to free shared memory

Fixes: bcd80be49a "drisw/glx: use XShm if possible"
Signed-off-by: Ray Zhang <zhanglei002@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
tags/19.1-branchpoint
Ray Zhang 6 years ago
parent
commit
b344e32cdf
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/glx/drisw_glx.c

+ 3
- 0
src/glx/drisw_glx.c View File

if (pdp->ximage) if (pdp->ximage)
XDestroyImage(pdp->ximage); XDestroyImage(pdp->ximage);


if (pdp->shminfo.shmid > 0)
XShmDetach(dpy, &pdp->shminfo);

free(pdp->visinfo); free(pdp->visinfo);


XFreeGC(dpy, pdp->gc); XFreeGC(dpy, pdp->gc);

Loading…
Cancel
Save