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 <ian.d.romanick@intel.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2013-10-02 17:38:05 -04:00
parent 53653f4889
commit 7f5adf73a0

View File

@ -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;
}