intel: Deassociated drawables from private context struct in intelUnbindContext
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 16 Sep 2009 14:39:58 +0000 (07:39 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 16 Sep 2009 14:39:58 +0000 (07:39 -0700)
commit2921a2555d0a76fa649b23c31e3264bbc78b2ff5
tree7a3e2dd4006e17d8027e43cb151548d362ecdbc6
parentd9ddbc3f4762d05ef2c4e651f3164ead92e85cd5
intel: Deassociated drawables from private context struct in intelUnbindContext

The generic DRI infrastructure makes sure that __DRIcontextRec::driDrawablePriv
and __DRIcontextRec::driReadablePriv are set to NULL after unbinding a
context.  However, the intel_context structure keeps cached copies of
these pointers.  If these cached pointers are not NULLed and the
drawable is actually destroyed after unbinding the context (typically
by way of glXDestroyWindow), freed memory will be dereferenced in
intelDestroyContext.

This should fix bug #23418.
src/mesa/drivers/dri/intel/intel_context.c