aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdri.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxdri.c')
-rw-r--r--xorg-server/glx/glxdri.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c
index 244eac6c2..326f53915 100644
--- a/xorg-server/glx/glxdri.c
+++ b/xorg-server/glx/glxdri.c
@@ -78,6 +78,7 @@ struct __GLXDRIscreen {
const __DRIlegacyExtension *legacy;
const __DRIcopySubBufferExtension *copySubBuffer;
const __DRIswapControlExtension *swapControl;
+ const __DRIconfig **driConfigs;
#ifdef __DRI_TEX_OFFSET
const __DRItexOffsetExtension *texOffset;
@@ -585,6 +586,8 @@ static __GLXtextureFromPixmap __glXDRItextureFromPixmap = {
static void
__glXDRIscreenDestroy(__GLXscreen *baseScreen)
{
+ int i;
+
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
screen->core->destroyScreen(screen->driScreen);
@@ -593,6 +596,12 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
__glXScreenDestroy(baseScreen);
+ if (screen->driConfigs) {
+ for (i = 0; screen->driConfigs[i] != NULL; i++)
+ free((__DRIconfig **)screen->driConfigs[i]);
+ free(screen->driConfigs);
+ }
+
free(screen);
}
@@ -967,7 +976,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
Bool isCapable;
size_t buffer_size;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- const __DRIconfig **driConfigs;
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
!DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
@@ -1095,7 +1103,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
pSAREA,
fd,
loader_extensions,
- &driConfigs,
+ &screen->driConfigs,
screen);
if (screen->driScreen == NULL) {
@@ -1105,7 +1113,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
}
screen->base.fbconfigs = glxConvertConfigs(screen->core,
- driConfigs, GLX_WINDOW_BIT);
+ screen->driConfigs,
+ GLX_WINDOW_BIT);
initializeExtensions(screen);