Skip to content
Verified Commit 1d118226 authored by Thomas E. Dickey's avatar Thomas E. Dickey
Browse files

fix a memory leak in XRegisterIMInstantiateCallback



Analysis:

    _XimRegisterIMInstantiateCallback() opens an XIM and closes it using
    the internal function pointers, but the internal close function does
    not free the pointer to the XIM (this would be done in XCloseIM()).

Report/patch:

    Date: Mon, 03 Oct 2022 18:47:32 +0800
    From: Po Lu <luangruo@yahoo.com>
    To: xorg-devel@lists.x.org
    Subject: Re: Yet another leak in Xlib

    For reference, here's how I'm calling XRegisterIMInstantiateCallback:

    XSetLocaleModifiers ("");
    XRegisterIMInstantiateCallback (compositor.display,
                                    XrmGetDatabase (compositor.display),
                                    (char *) compositor.resource_name,
                                    (char *) compositor.app_name,
                                    IMInstantiateCallback, NULL);

    and XMODIFIERS is:

        @im=ibus

Signed-off-by: default avatarThomas E. Dickey <dickey@invisible-island.net>
parent 1f8fd7ff
Loading
Loading
Loading
Pipeline #706944 passed with stages
in 7 minutes and 8 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment