aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rw-r--r--xorg-server/dix/dispatch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index 1ed1d4863..e78c71e1c 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -3790,6 +3790,8 @@ AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
if (!pScreen)
return -1;
+ dixInitScreenSpecificPrivates(pScreen);
+
if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) {
free(pScreen);
return -1;
@@ -3841,6 +3843,7 @@ AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
screenInfo.screens[i] = pScreen;
screenInfo.numScreens++;
if (!(*pfnInit) (pScreen, argc, argv)) {
+ dixFreeScreenSpecificPrivates(pScreen);
dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
free(pScreen);
screenInfo.numScreens--;