fix mem leaks
authorPanagiotis Papadakos <papadako@csd.uoc.gr>
Mon, 5 Feb 2007 15:17:50 +0000 (08:17 -0700)
committerBrian <brian@yutani.localnet.net>
Mon, 5 Feb 2007 15:17:50 +0000 (08:17 -0700)
src/glx/x11/dri_glx.c
src/glx/x11/glxext.c

index 0649358ecc8040dbc64c6f17f53f259cf6c74edb..d88ce913644ed7ae06193f457e0bdeac6e446e4d 100644 (file)
@@ -398,6 +398,7 @@ static void driDestroyDisplay(Display *dpy, void *private)
                    else
                       Drivers = driver->next;
 
+                   Xfree(driver->name);
                    Xfree(driver);
                    break;
                 }
index d24f853d546dcd0d99dd050bafcac7ffd7170324..a039bca234d085fb9a7744efe2a69868b29fca97 100644 (file)
@@ -396,6 +396,10 @@ static int __glXFreeDisplayPrivate(XExtData *extension)
        (*priv->driDisplay.destroyDisplay)(priv->dpy,
                                           priv->driDisplay.private);
     priv->driDisplay.private = NULL;
+    if (priv->driDisplay.createNewScreen) {
+        Xfree(priv->driDisplay.createNewScreen); /* free array of ptrs */
+        priv->driDisplay.createNewScreen = NULL;
+    }
 #endif
 
     Xfree((char*) priv);