xserver: Branch 'master'

Kristian Høgsberg krh at kemper.freedesktop.org
Mon Jul 21 12:33:25 PDT 2008


 glx/glxcmds.c |    4 ----
 glx/glxext.c  |    5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit d5ae85b5b722821499d5796cf0973ecb6ec125f1
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Jul 21 15:28:50 2008 -0400

    Fix embarrasing GLXPixmap leak.

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 0ca0598..0831135 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1226,10 +1226,6 @@ static int DoDestroyDrawable(__GLXclientState *cl, XID glxdrawable, int type)
 	}
     }
 
-    if (type == GLX_DRAWABLE_PIXMAP) {
-	((PixmapPtr) pGlxDraw->pDraw)->refcnt--;
-    }
-
     FreeResource(glxdrawable, FALSE);
 
     return Success;
diff --git a/glx/glxext.c b/glx/glxext.c
index 85d8deb..cd92f6d 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -107,6 +107,11 @@ static int ContextGone(__GLXcontext* cx, XID id)
 */
 static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
 {
+    ScreenPtr pScreen = glxPriv->pDraw->pScreen;
+
+    if (glxPriv->type == GLX_DRAWABLE_PIXMAP)
+	    (*pScreen->DestroyPixmap)((PixmapPtr) glxPriv->pDraw);
+
     glxPriv->pDraw = NULL;
     glxPriv->drawId = 0;
     __glXUnrefDrawable(glxPriv);


More information about the xorg-commit mailing list