fix tiny memory leak in read_packet (leak only happens when malloc returns NULL so it's very rare)

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Henning Sten 2008-09-20 13:08:58 +02:00 committed by Julien Danjou
parent 9afadd2aef
commit db332dcda9

View 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;