aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/main.c')
-rw-r--r--xorg-server/dix/main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index cdca10250..f603aeee5 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -380,6 +380,15 @@ main(int argc, char *argv[], char *envp[])
CloseDownEvents();
+ for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) {
+ ScreenPtr pScreen = screenInfo.gpuscreens[i];
+ FreeScratchPixmapsForScreen(pScreen);
+ (*pScreen->CloseScreen) (pScreen);
+ dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
+ free(pScreen);
+ screenInfo.numGPUScreens = i;
+ }
+
for (i = screenInfo.numScreens - 1; i >= 0; i--) {
FreeScratchPixmapsForScreen(screenInfo.screens[i]);
FreeGCperDepth(i);
@@ -391,15 +400,6 @@ main(int argc, char *argv[], char *envp[])
screenInfo.numScreens = i;
}
- for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) {
- ScreenPtr pScreen = screenInfo.gpuscreens[i];
- FreeScratchPixmapsForScreen(pScreen);
- (*pScreen->CloseScreen) (pScreen);
- dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
- free(pScreen);
- screenInfo.numGPUScreens = i;
- }
-
ReleaseClientIds(serverClient);
dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT);
serverClient->devPrivates = NULL;