aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorErkki Seppälä <erkki.seppala@vincit.fi>2011-01-10 16:17:47 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:24 +0200
commit8aacb3fab5824e20e07699cef93c5a20daaff368 (patch)
tree686156443cd8be583ba12c9507519091c19147bf /nx-X11
parent1a72bc41460aa37b2ae6ce37bc9fb9e3644f5943 (diff)
downloadnx-libs-8aacb3fab5824e20e07699cef93c5a20daaff368.tar.gz
nx-libs-8aacb3fab5824e20e07699cef93c5a20daaff368.tar.bz2
nx-libs-8aacb3fab5824e20e07699cef93c5a20daaff368.zip
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> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/lib/X11/XlibInt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c
index e4078ca31..917f503fa 100644
--- a/nx-X11/lib/X11/XlibInt.c
+++ b/nx-X11/lib/X11/XlibInt.c
@@ -2839,10 +2839,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);
}
}