From 8aacb3fab5824e20e07699cef93c5a20daaff368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= Date: Mon, 10 Jan 2011 16:17:47 +0200 Subject: Using freed pointer "e" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reordered code to first to do the comparison and then to release data Reviewed-by: Alan Coopersmith Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Erkki Seppälä Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/XlibInt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11') 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); } } -- cgit v1.2.3