See Debian bug#232133 (http://bugs.debian.org/232133): The manpage for XRegisterIMInstantiateCallback (and XUnregisterIMInstantiateCallback) shows the fifth argument as type "XIMProc". The Xlib.h header, however, uses a XIDProc as fifth argument and the xfree code indeed passes a display as first argument (i.e. uses it like a XIDProc). Further, the sixth argument is documented to be a XPointer * (and actually takes a XPointer * on other X11 imps), whereas xfree86 wants a XPointer there. Either xfree86 has wrong code, or wrong manpages.
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Fixed in e972b0bb255af4f3258217852542faf5afa60b28.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.