Skip to content

Commit

Permalink
util/IMdkit: Disable while loop before call ForwardEventMessageProc()
Browse files Browse the repository at this point in the history
Seems ProcessQueue() had a wrong XFree() with async process-key-event.
Fixes: 506ac99

BUG=#2484
  • Loading branch information
fujiwarat committed Mar 23, 2023
1 parent 497f0c7 commit 8f706d1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions util/IMdkit/i18nPtHdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down

0 comments on commit 8f706d1

Please sign in to comment.