[glx 2/7] glx/glxdri2.c: Fix memory leak in error case

Niels Thykier niels at thykier.net
Fri Nov 2 02:41:48 PDT 2012


Signed-off-by: Niels Thykier <niels at thykier.net>
---
 glx/glxdri2.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index bce1bfa..93c4bc1 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -939,6 +939,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
                      &screen->fd, &driverName, &deviceName)) {
         LogMessage(X_INFO,
                    "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum);
+        free(screen);
         return NULL;
     }
 
-- 
1.7.10.4



More information about the xorg-devel mailing list