Subject: Re: bug#18403: 24.4.50; emacsclient sometimes hangs on exit with Lucid GUI client

From: Paul Eggert <[email-masked]>
Date: Sun, 07 Sep 2014 19:48:00 -0700

Thanks, I can confirm that the attached patch (which reverts that 
change) does fix the bug on the trunk for me (trunk bzr 117838). 
Dmitry, do you have any thoughts?
=== modified file 'src/xterm.c'
--- src/xterm.c	2014-04-02 16:17:08 +0000
+++ src/xterm.c	2014-04-02 15:14:50 +0000
@@ -10162,7 +10162,6 @@
 
 #ifdef USE_LUCID
   {
-    XFontStruct *xfont = NULL;
     XrmValue d, fr, to;
     Font font;
 
@@ -10176,10 +10175,8 @@
     x_catch_errors (dpy);
     if (!XtCallConverter (dpy, XtCvtStringToFont, &d, 1, &fr, &to, NULL))
       emacs_abort ();
-    if (x_had_errors_p (dpy) || !((xfont = XQueryFont (dpy, font))))
+    if (x_had_errors_p (dpy) || !XQueryFont (dpy, font))
       XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15");
-    if (xfont)
-      XFreeFont (dpy, xfont);
     x_uncatch_errors ();
   }
 #endif