summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-09-09 08:06:40 -0400
committerKristian Høgsberg <[email protected]>2010-09-09 08:06:51 -0400
commit80e48ddcf6d5bdc1fc063f28b7af478dae330233 (patch)
treea70b86a526bcd8cf3e9b8b446a318c1c90838793 /src
parent777f352e6087e3ef05f7a88232f23e4f971bc5a0 (diff)
glx: Fix another use-after-free problem
Diffstat (limited to 'src')
-rw-r--r--src/glx/glx_pbuffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index d1cb66b87ca..34892e8b1a2 100644
--- a/src/glx/glx_pbuffer.c
+++ b/src/glx/glx_pbuffer.c
@@ -220,12 +220,14 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable)
{
struct glx_display *const priv = __glXInitialize(dpy);
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
+ XID xid;
if (pdraw != NULL) {
+ xid = pdraw->xDrawable;
(*pdraw->destroyDrawable) (pdraw);
__glxHashDelete(priv->drawHash, drawable);
if (destroy_xdrawable)
- XFreePixmap(pdraw->psc->dpy, pdraw->xDrawable);
+ XFreePixmap(priv->dpy, xid);
}
}