Mesa (master): glx: Fix another use-after-free problem
Kristian Høgsberg
krh at kemper.freedesktop.org
Thu Sep 9 12:12:23 UTC 2010
Module: Mesa
Branch: master
Commit: 80e48ddcf6d5bdc1fc063f28b7af478dae330233
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=80e48ddcf6d5bdc1fc063f28b7af478dae330233
Author: Kristian Høgsberg <krh at bitplanet.net>
Date: Thu Sep 9 08:06:40 2010 -0400
glx: Fix another use-after-free problem
---
src/glx/glx_pbuffer.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index d1cb66b..34892e8 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);
}
}
More information about the mesa-commit
mailing list