X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_conn.c;h=ed2153d27d903aeb4fad92fc193c9ba9fa3e2db4;hb=be7e528eae62ddee14fa50f2c0e9036bafbc9f81;hp=251d62e01dbf63161c7339deedac59fe66fc90b0;hpb=c7a57043da1717c18703a38772555fea6aa811bf;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_conn.c b/src/xcb_conn.c index 251d62e..ed2153d 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -211,8 +211,10 @@ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info) xcb_connection_t* c; c = calloc(1, sizeof(xcb_connection_t)); - if(!c) + if(!c) { + close(fd); return (xcb_connection_t *) &error_connection; + } c->fd = fd;