]> git.eshelyaron.com Git - emacs.git/commitdiff
(xim_close_dpy): Avoid double-free on X11R6 XIM.
authorChong Yidong <cyd@stupidchicken.com>
Tue, 4 Nov 2008 16:47:34 +0000 (16:47 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 4 Nov 2008 16:47:34 +0000 (16:47 +0000)
src/xterm.c

index 264f2c213638f00813fd791a53dd4f7820e0ce78..788bc39e2d6dbdd59f68f259055007d96853e602 100644 (file)
@@ -8319,9 +8319,11 @@ xim_close_dpy (dpyinfo)
        XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
                                          NULL, EMACS_CLASS,
                                          xim_instantiate_callback, NULL);
-#endif /* not HAVE_X11R6_XIM */
+#else /* not HAVE_X11R6_XIM */
+      /* If we have X11R6 xim, this causes a double-free.  */
       if (dpyinfo->display)
        XCloseIM (dpyinfo->xim);
+#endif /* HAVE_X11R6_XIM */
       dpyinfo->xim = NULL;
       XFree (dpyinfo->xim_styles);
     }