From 7f5adf73a0f9a951a6df201532b4031d38054369 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 2 Oct 2013 17:38:05 -0400 Subject: [PATCH] glx: Simplify glXDestroyContext We can just free the resource unconditionally here. ContextGone (which FreeResourceByType will call) already does: cx->idExists = GL_FALSE; if (!cx->currentClient) { __glXFreeContext(cx); } Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson --- glx/glxcmds.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index f7ca8267e..0fc73628b 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -406,9 +406,7 @@ __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc) &glxc, &err)) return err; - glxc->idExists = GL_FALSE; - if (!glxc->currentClient) - FreeResourceByType(req->context, __glXContextRes, FALSE); + FreeResourceByType(req->context, __glXContextRes, FALSE); return Success; }