xutil: fix potential leak

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-14 08:23:16 +02:00
parent 1cae0e50ab
commit ce08d9769f
1 changed files with 3 additions and 3 deletions

View File

@ -46,14 +46,14 @@ xutil_gettextprop(xcb_connection_t *conn, xcb_window_t w, xutil_atom_cache_t **a
xcb_get_property_reply_t *prop_r;
void *prop_val;
if(!text)
return false;
prop_c = xcb_get_property_unchecked(conn, false,
w, atom,
XCB_GET_PROPERTY_TYPE_ANY,
0L, 1000000L);
if(!text)
return false;
prop_r = xcb_get_property_reply(conn, prop_c, NULL);
if(!prop_r || !prop_r->value_len || prop_r->format != 8)