[Xcb] [Xcb-commit] icccm

Julien Cristau jcristau at debian.org
Thu Jun 24 08:32:55 PDT 2010


On Thu, Jun 24, 2010 at 17:26:28 +0200, Vincent Torri wrote:

> 
> 
> On Thu, 24 Jun 2010, Alan Coopersmith wrote:
> 
> >icccm/icccm.c |    4 +++-
> >1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >New commits:
> >commit b2c587dbd6fde31a0fdb3fa19fac94ac30a18a6f
> >Author: Alan Coopersmith <alan.coopersmith at oracle.com>
> >Date:   Sun Jun 13 11:54:32 2010 -0700
> >
> >   Close leak in xcb_get_text_property_reply when reply->type == XCB_NONE
> >
> >   Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> >
> >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;
> >+  }
> 
> there will be a crash if reply is NULL. check reply before freeing it.
> 
No there won't be.

Cheers,
Julien


More information about the Xcb mailing list