From e32b601e7d79e8fa67b3e9f636125eebc01f3884 Mon Sep 17 00:00:00 2001 From: =?utf8?q?RALOVICH=2C=20Krist=C3=B3f?= Date: Thu, 23 Jul 2009 17:04:52 +0200 Subject: [PATCH] glx: properly release DRI configs Release per screen DRI driver configs during screen destruction. --- src/glx/x11/glxext.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index b296b7c651c..3078662c9da 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -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); -- 2.30.2