diff options
Diffstat (limited to 'xorg-server/dix/registry.c')
-rwxr-xr-x[-rw-r--r--] | xorg-server/dix/registry.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/xorg-server/dix/registry.c b/xorg-server/dix/registry.c index 18344f417..ce741c28e 100644..100755 --- a/xorg-server/dix/registry.c +++ b/xorg-server/dix/registry.c @@ -281,14 +281,9 @@ LookupResourceName(RESTYPE resource) return resources[resource] ? resources[resource] : XREGISTRY_UNKNOWN; } -/* - * Setup and teardown - */ void -dixResetRegistry(void) +dixFreeRegistry(void) { - ExtensionEntry extEntry; - /* Free all memory */ while (nmajor--) { while (nminor[nmajor]) @@ -316,9 +311,23 @@ dixResetRegistry(void) nmajor = nevent = nerror = nresource = 0; + if (fh) { + fclose(fh); + fh = NULL; + } +} + +/* + * Setup and teardown + */ +void +dixResetRegistry(void) +{ + ExtensionEntry extEntry; + + dixFreeRegistry(); + /* Open the protocol file */ - if (fh) - fclose(fh); fh = fopen(FILENAME, "r"); if (!fh) LogMessage(X_WARNING, |