summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/dri_util.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-18 16:17:10 -0700
committerEric Anholt <[email protected]>2010-08-18 16:18:38 -0700
commita482e033082bb0794fdf56c47dd76d949afde6fa (patch)
tree08f0e074b65e3d320e6a8c98180dd8006cd58a8b /src/mesa/drivers/dri/common/dri_util.c
parent4532feba14fcf4e39ea6e44dd2b6a290697bbd50 (diff)
dri2: Clean up the common dri2 options at screen destroy.
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.c')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index dce84ef0deb..5eb8b62f450 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -714,6 +714,9 @@ static void driDestroyScreen(__DRIscreen *psp)
(void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX);
(void)drmUnmap((drmAddress)psp->pFB, psp->fbSize);
(void)drmCloseOnce(psp->fd);
+ } else {
+ driDestroyOptionCache(&psp->optionCache);
+ driDestroyOptionInfo(&psp->optionInfo);
}
free(psp);
@@ -839,7 +842,6 @@ dri2CreateNewScreen(int scrn, int fd,
static const __DRIextension *emptyExtensionList[] = { NULL };
__DRIscreen *psp;
drmVersionPtr version;
- driOptionCache options;
if (driDriverAPI.InitScreen2 == NULL)
return NULL;
@@ -873,8 +875,10 @@ dri2CreateNewScreen(int scrn, int fd,
psp->DriverAPI = driDriverAPI;
- driParseOptionInfo(&options, __dri2ConfigOptions, __dri2NConfigOptions);
- driParseConfigFiles(&psp->optionCache, &options, psp->myNum, "dri2");
+ driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions,
+ __dri2NConfigOptions);
+ driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum,
+ "dri2");
return psp;
}