[Xcb] [PATCH 3/3] Use WSAStartup()/WSACleanup() on WIN32
Josh Triplett
josh at joshtriplett.org
Fri Jan 6 09:50:09 PST 2012
On Fri, Jan 06, 2012 at 05:24:18PM +0000, Jon TURNEY wrote:
>
>
> On 06/01/2012 03:36, Josh Triplett wrote:
> > On Thu, Jan 05, 2012 at 11:55:30PM +0200, Rémi Denis-Courmont wrote:
> >> Le jeudi 5 janvier 2012 23:28:06 Josh Triplett, vous avez écrit :
> >>> Or will Winsock just tell XCB to use the older version?
> >>
> >> If the version requested by XCB is not supported, WSAStartup() will fail. Note
> >> that there is a bug in the patch: XCB should never call WSACleanup() if
> >> WSAStartup() did not succeed.
> >
> > I don't see how that case could happen in the patch you provided.
>
> They should be matched by the fact that xcb_disconnect() can only be called
> (once) on the xcb_connection_t produced by a successful xcb_connect*().
As far as I can tell, though, nothing calls WSACleanup if xcb_connect
fails after a successful WSAStartup. xcb_connect should call WSACleanup
if it returns an error connection.
- Josh Triplett
More information about the Xcb
mailing list