allow compile-time setting for XCB queue buffer size
[free-sw/xcb/libxcb] / src / xcb_in.c
index 31a1e60..f613772 100644 (file)
@@ -191,6 +191,7 @@ static int read_packet(xcb_connection_t *c)
         if(!cur)
         {
             _xcb_conn_shutdown(c);
+            free(buf);
             return 0;
         }
         cur->reply = buf;
@@ -252,7 +253,7 @@ static void free_reply_list(struct reply_list *head)
     }
 }
 
-static int read_block(const int fd, void *buf, const size_t len)
+static int read_block(const int fd, void *buf, const ssize_t len)
 {
     int done = 0;
     while(done < len)