From: Chong Yidong Date: Tue, 4 Nov 2008 16:47:34 +0000 (+0000) Subject: (xim_close_dpy): Avoid double-free on X11R6 XIM. X-Git-Tag: emacs-pretest-23.0.90~1973 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=15773d23ec575cee0cf5396bc4183bc754785c8b;p=emacs.git (xim_close_dpy): Avoid double-free on X11R6 XIM. --- diff --git a/src/xterm.c b/src/xterm.c index 264f2c21363..788bc39e2d6 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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); }