On 01/26/11 11:53 PM, Erkki Seppälä wrote: > Reordered code to first to do the comparison and then to release data > > Reviewed-by: Ander Conselvan de Oliveira > <[email protected]> > Signed-off-by: Erkki Seppälä <[email protected]> > --- > src/XlibInt.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/XlibInt.c b/src/XlibInt.c > index d55c26a..c385f4c 100644 > --- a/src/XlibInt.c > +++ b/src/XlibInt.c > @@ -777,10 +777,10 @@ _XFreeEventCookies(Display *dpy) > head = (struct stored_event**)&dpy->cookiejar; > > DL_FOREACH_SAFE(*head, e, tmp) { > - XFree(e->ev.data); > - XFree(e); > if (dpy->cookiejar == e) > dpy->cookiejar = NULL; > + XFree(e->ev.data); > + XFree(e); > } > } >
Reviewed-by: Alan Coopersmith <[email protected]> -- -Alan Coopersmith- [email protected] Oracle Solaris Platform Engineering: X Window System _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
