Commit 8aacb3fa authored by Erkki Seppälä's avatar Erkki Seppälä Committed by Ulrich Sibiller

Using freed pointer "e"

Reordered code to first to do the comparison and then to release data Reviewed-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: 's avatarAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: 's avatarErkki Seppälä <erkki.seppala@vincit.fi> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 1a72bc41
...@@ -2839,10 +2839,10 @@ _XFreeEventCookies(Display *dpy) ...@@ -2839,10 +2839,10 @@ _XFreeEventCookies(Display *dpy)
head = (struct stored_event**)&dpy->cookiejar; head = (struct stored_event**)&dpy->cookiejar;
DL_FOREACH_SAFE(*head, e, tmp) { DL_FOREACH_SAFE(*head, e, tmp) {
XFree(e->ev.data);
XFree(e);
if (dpy->cookiejar == e) if (dpy->cookiejar == e)
dpy->cookiejar = NULL; dpy->cookiejar = NULL;
XFree(e->ev.data);
XFree(e);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment