diff options
author | Erkki Seppälä <erkki.seppala@vincit.fi> | 2011-01-10 16:17:47 +0200 |
---|---|---|
committer | Erkki Seppälä <erkki.seppala@vincit.fi> | 2011-01-31 11:23:13 +0200 |
commit | 59da8a211ef723909d0530c0331d541db8e63378 (patch) | |
tree | c742e245a4dc3be1238b87a7f21891065968db12 /src | |
parent | 0f11c229f7099f7c5aeed4691b358dca151dac7d (diff) |
Using freed pointer "e"
Reordered code to first to do the comparison and then to release data
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Diffstat (limited to 'src')
-rw-r--r-- | 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); } } |