[Mesa-dev] [PATCH 1/2] i965: Don't leave dangling pointer to brw context on failure

Kenneth Graunke kenneth at whitecape.org
Thu Sep 27 11:40:50 PDT 2012


On 09/26/2012 11:12 AM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> 
> Otherwise intelDestroyContext would try to dereference the pointer to
> freed memory.
> 
> v2: Don't call intelDestroyContext if the context already freed due to
> failure.
> 
> NOTE: This is a candidate for the 9.0 branch.
> 
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301

Patches 1 and 2 are:
Reviewed-and-tested-by: Kenneth Graunke <kenneth at whitecape.org>

To test, I decreased our max supported version from 30 to 19 (obviously
it doesn't exist) and ran L4D2, which used to fail to create the context
and segfault, and now fails gracefully.


More information about the mesa-dev mailing list