glx: properly release DRI configs
authorRALOVICH, Kristóf <tade60@freemail.hu>
Thu, 23 Jul 2009 15:04:52 +0000 (17:04 +0200)
committerBrian Paul <brianp@vmware.com>
Tue, 28 Jul 2009 16:35:56 +0000 (10:35 -0600)
Release per screen DRI driver configs during screen destruction.

src/glx/x11/glxext.c

index b296b7c..3078662 100644 (file)
@@ -149,6 +149,12 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv)
       Xfree((char *) psc->serverGLXexts);
 
 #ifdef GLX_DIRECT_RENDERING
+      if (psc->driver_configs) {
+         for(unsigned int i = 0; psc->driver_configs[i]; i++)
+            free((__DRIconfig*)psc->driver_configs[i]);
+         free(psc->driver_configs);
+         psc->driver_configs = NULL;
+      }
       if (psc->driScreen) {
          psc->driScreen->destroyScreen(psc);
          __glxHashDestroy(psc->drawHash);