summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-09-10 15:04:00 -0700
committerKeith Packard <keithp@keithp.com>2014-09-18 15:29:27 -0700
commita11fc2493e85e4a532f4954805a7c6d1c601b08f (patch)
treee43b0dde717f3e0a5ba344362e3ca2e76b4cba83 /dix
parent9e07f3a3d28b01402beecb3280c94fc525bd8075 (diff)
dix: Close protocol.txt after we're done loading extension names
Don't leave this file open during the whole server execution process; close it once all of the extensions are initialized. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/main.c2
-rw-r--r--dix/registry.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/dix/main.c b/dix/main.c
index 7427e08ca..930a85fb7 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -269,6 +269,8 @@ dix_main(int argc, char *argv[], char *envp[])
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
+ dixCloseRegistry();
+
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
if (!PanoramiXCreateConnectionBlock()) {
diff --git a/dix/registry.c b/dix/registry.c
index 82a3340e1..8b76d56ad 100644
--- a/dix/registry.c
+++ b/dix/registry.c
@@ -309,7 +309,11 @@ dixFreeRegistry(void)
resources = NULL;
nmajor = nevent = nerror = nresource = 0;
+}
+void
+dixCloseRegistry(void)
+{
if (fh) {
fclose(fh);
fh = NULL;