From fbe19c66c36acfb484809111cf02579a3baf2f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 22 Oct 2007 18:28:03 +0200 Subject: [PATCH] GLX: Fix leak of X pixmaps associated with GLX pixmaps. --- GL/glx/glxcmds.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index ac2393c3b..992ddbce5 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.c @@ -1215,6 +1215,11 @@ static int DoDestroyDrawable(__GLXclientState *cl, XID glxdrawable, int type) return __glXError(GLXBadPbuffer); } } + + if (type == GLX_DRAWABLE_PIXMAP) { + ((PixmapPtr) pGlxDraw->pDraw)->refcnt--; + } + FreeResource(glxdrawable, FALSE); return Success;