diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2023-03-23 13:07:38 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2023-03-23 13:07:38 +0900 |
commit | 8f706d160631f1ffdbfa16543a38b9d5f91c16ad (patch) | |
tree | 44d81b692d27edb77feeb261dacb4130a12d3e35 | |
parent | 497f0c74230a65309e22ce5569060ce48310406b (diff) | |
download | ibus-8f706d160631f1ffdbfa16543a38b9d5f91c16ad.tar.gz |
util/IMdkit: Disable while loop before call ForwardEventMessageProc()
Seems ProcessQueue() had a wrong XFree() with async process-key-event.
Fixes: https://github.com/ibus/ibus/commit/506ac99
BUG=https://github.com/ibus/ibus/issues/2484
-rw-r--r-- | util/IMdkit/i18nPtHdr.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/util/IMdkit/i18nPtHdr.c b/util/IMdkit/i18nPtHdr.c index 8dc52714..ec20e322 100644 --- a/util/IMdkit/i18nPtHdr.c +++ b/util/IMdkit/i18nPtHdr.c @@ -1747,11 +1747,13 @@ static void ProcessQueue (XIMS ims, CARD16 connect_id) XimProtoHdr *hdr = (XimProtoHdr *) client->pending->p; unsigned char *p1 = (unsigned char *) (hdr + 1); IMProtocol call_data; + XIMPending *old = client->pending; call_data.major_code = hdr->major_opcode; call_data.any.minor_code = hdr->minor_opcode; call_data.any.connect_id = connect_id; + client->pending = old->next; switch (hdr->major_opcode) { case XIM_FORWARD_EVENT: @@ -1760,12 +1762,7 @@ static void ProcessQueue (XIMS ims, CARD16 connect_id) } /*endswitch*/ XFree (hdr); - { - XIMPending *old = client->pending; - - client->pending = old->next; - XFree (old); - } + XFree (old); } /*endwhile*/ return; |