From 98899a80f02b9616a1038c4c51993435c1074046 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 23 Nov 2009 10:29:29 +0000 Subject: Solved problem of accessing memory after being freed. --- xorg-server/glx/glxext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xorg-server/glx') diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c index 42fcf5914..c8885fd3a 100644 --- a/xorg-server/glx/glxext.c +++ b/xorg-server/glx/glxext.c @@ -129,8 +129,10 @@ static int glxBlockClients; static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) { __GLXcontext *c; + __GLXcontext *cnext; - for (c = glxAllContexts; c; c = c->next) { + for (c = glxAllContexts; c; c = cnext) { + cnext=c->next; /* Safe because c is going to be freed */ if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) { int i; -- cgit v1.2.3