Initializing the dev privates code after allocating the server client
dev privates would cause the memory leak check to fire at server
startup or reset.

Signed-off-by: Keith Packard <[email protected]>
---

This eliminates the memory leak warning which prompted Tiago's change
to print those only in debug builds.

 dix/main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dix/main.c b/dix/main.c
index 5c46dc1..47a932f 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -184,6 +184,9 @@ int main(int argc, char *argv[], char *envp[])
        clients[0] = serverClient;
        currentMaxClients = 1;
 
+       /* Initialize privates before first allocation */
+       dixResetPrivates();
+
        /* Initialize server client devPrivates, to be reallocated as
         * more client privates are registered
         */
@@ -200,7 +203,6 @@ int main(int argc, char *argv[], char *envp[])
        InitEvents();
        InitSelections();
        InitGlyphCaching();
-       dixResetPrivates();
        dixResetRegistry();
        ResetFontPrivateIndex();
        InitCallbackManager();
-- 
1.7.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to