[PATCH] glx: Pass GLX drawable ID to DRI2CreateDrawable().

Michel Dänzer michel at daenzer.net
Thu Jun 28 04:39:29 PDT 2012


From: Michel Dänzer <michel.daenzer at amd.com>

Otherwise the DRI2Drawable may retain references to the destroyed
__GLXDRIdrawable, leading to use after free in __glXDRIinvalidateBuffers().

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50019

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 glx/glxdri2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 7b76c3a..3012cb5 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -597,7 +597,7 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
     private->base.waitGL = __glXDRIdrawableWaitGL;
     private->base.waitX = __glXDRIdrawableWaitX;
 
-    if (DRI2CreateDrawable(client, pDraw, drawId,
+    if (DRI2CreateDrawable(client, pDraw, glxDrawId,
                            __glXDRIinvalidateBuffers, private)) {
         free(private);
         return NULL;
-- 
1.7.10




More information about the xorg-devel mailing list