aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-11-04 16:47:34 +0000
committerChong Yidong2008-11-04 16:47:34 +0000
commit15773d23ec575cee0cf5396bc4183bc754785c8b (patch)
tree21ad0d32f79a6484fbd9f2df2df5344fc22e8397 /src
parent860cd236ce8e61f3fe1c4aeeedc144a9497cc26e (diff)
downloademacs-15773d23ec575cee0cf5396bc4183bc754785c8b.tar.gz
emacs-15773d23ec575cee0cf5396bc4183bc754785c8b.zip
(xim_close_dpy): Avoid double-free on X11R6 XIM.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c4
1 files changed, 3 insertions, 1 deletions
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)
8319 XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb, 8319 XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
8320 NULL, EMACS_CLASS, 8320 NULL, EMACS_CLASS,
8321 xim_instantiate_callback, NULL); 8321 xim_instantiate_callback, NULL);
8322#endif /* not HAVE_X11R6_XIM */ 8322#else /* not HAVE_X11R6_XIM */
8323 /* If we have X11R6 xim, this causes a double-free. */
8323 if (dpyinfo->display) 8324 if (dpyinfo->display)
8324 XCloseIM (dpyinfo->xim); 8325 XCloseIM (dpyinfo->xim);
8326#endif /* HAVE_X11R6_XIM */
8325 dpyinfo->xim = NULL; 8327 dpyinfo->xim = NULL;
8326 XFree (dpyinfo->xim_styles); 8328 XFree (dpyinfo->xim_styles);
8327 } 8329 }