From ce08d9769ff6302def8e99995c841ae0d2a820cd Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 14 Jun 2008 08:23:16 +0200 Subject: [PATCH] xutil: fix potential leak Signed-off-by: Julien Danjou --- common/xutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/xutil.c b/common/xutil.c index 3c7abf15..fe3218ea 100644 --- a/common/xutil.c +++ b/common/xutil.c @@ -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)