diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-02-27 10:53:08 -0800 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-02-27 10:53:08 -0800 |
commit | 5e350126a728f3c0c3bc8d8673e5ad67dc174f79 (patch) | |
tree | be62623ea659859f674ff32725a635d99e847a5a | |
parent | 731c85762d8994119f4eaf572cc59c9adbb7abd9 (diff) |
Bugfix: how about *not* leaking all pending_replies when no reply matches, as often happens with Xlib?
-rw-r--r-- | src/xcb_in.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xcb_in.c b/src/xcb_in.c index a805fa8..9e629ba 100644 --- a/src/xcb_in.c +++ b/src/xcb_in.c @@ -91,9 +91,9 @@ static int read_packet(XCBConnection *c) c->in.request_read = (lastread & 0xffff0000) | genrep.sequence; if(c->in.request_read != lastread) { - pending_reply *oldpend = c->in.pending_replies; - if(oldpend && oldpend->request == lastread) + while(c->in.pending_replies && c->in.pending_replies->request < c->in.request_read) { + pending_reply *oldpend = c->in.pending_replies; c->in.pending_replies = oldpend->next; if(!oldpend->next) c->in.pending_replies_tail = &c->in.pending_replies; |