Mercurial > emacs
comparison src/xterm.c @ 99379:3f2f25d635e6
(xim_close_dpy): Avoid double-free on X11R6 XIM.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 04 Nov 2008 16:47:34 +0000 |
parents | 0310a76120f5 |
children | c04fb0278b64 |
comparison
equal
deleted
inserted
replaced
99378:e2dea54cb619 | 99379:3f2f25d635e6 |
---|---|
8317 #ifdef HAVE_X11R6_XIM | 8317 #ifdef HAVE_X11R6_XIM |
8318 if (dpyinfo->display) | 8318 if (dpyinfo->display) |
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 } |
8328 #endif /* HAVE_XIM */ | 8330 #endif /* HAVE_XIM */ |
8329 } | 8331 } |