[xorg-commit-diffs] xc/programs/Xserver/hw/xwin InitOutput.c, 1.1.4.1.2.34, 1.1.4.1.2.35

Alexander Gottwald xorg-commit at pdx.freedesktop.org
Tue Apr 13 11:48:09 PDT 2004


Committed by: ago

Update of /cvs/xorg/xc/programs/Xserver/hw/xwin
In directory pdx:/tmp/cvs-serv29387

Modified Files:
      Tag: CYGWIN
	InitOutput.c 
Log Message:
fix segfault if LogInit fails


Index: InitOutput.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/InitOutput.c,v
retrieving revision 1.1.4.1.2.34
retrieving revision 1.1.4.1.2.35
diff -u -d -r1.1.4.1.2.34 -r1.1.4.1.2.35
--- a/InitOutput.c	12 Apr 2004 17:26:59 -0000	1.1.4.1.2.34
+++ b/InitOutput.c	13 Apr 2004 18:48:06 -0000	1.1.4.1.2.35
@@ -279,8 +279,13 @@
 #endif
 
   if (!g_fLogInited) {
-    LogInit (g_pszLogFile, NULL);
+    /* keep this order. If LogInit fails it calls Abort which then calls
+     * ddxGiveUp where LogInit is called again and creates an infinite 
+     * recursion. If we set g_fLogInited to TRUE before the init we 
+     * avoid the second call 
+     */  
     g_fLogInited = TRUE;
+    LogInit (g_pszLogFile, NULL);
   }  
   LogSetParameter (XLOG_FLUSH, 1);
   LogSetParameter (XLOG_VERBOSITY, g_iLogVerbose);




More information about the xorg-commit-diffs mailing list