summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-06-13 11:54:32 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-06-24 08:03:39 -0700
commit7051a5948e9a9368f82e1acaa4618ab317e6c594 (patch)
tree35a3df75ff11196c43b6231e34863b7cd493cc15
parent2839274ad7f8157417f857bcd2de736895371e5f (diff)
Close leak in xcb_get_text_property_reply when reply->type == XCB_NONE
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--icccm/icccm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/icccm/icccm.c b/icccm/icccm.c
index 1c66a74..e620bde 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -60,8 +60,10 @@ xcb_get_text_property_reply(xcb_connection_t *c,
{
xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
- if(!reply || reply->type == XCB_NONE)
+ if(!reply || reply->type == XCB_NONE) {
+ free(reply);
return 0;
+ }
prop->_reply = reply;
prop->encoding = prop->_reply->type;