From: Jamey Sharp Date: Mon, 27 Feb 2006 18:53:08 +0000 (-0800) Subject: Bugfix: how about *not* leaking all pending_replies when no reply matches, as often... X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e350126a728f3c0c3bc8d8673e5ad67dc174f79;p=free-sw%2Fxcb%2Flibxcb Bugfix: how about *not* leaking all pending_replies when no reply matches, as often happens with Xlib? --- 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;