i965: Don't free the intel_context structure when intelCreateContext fails.
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 31 Aug 2012 21:55:21 +0000 (14:55 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Sep 2012 22:05:24 +0000 (15:05 -0700)
commit87f26214d6bdeb439b30615ec53c293c5141cf11
treed9cb21325f1f0875a850e14b382f52c24a7bc734
parent22897c74979aa02facdd5cd729db8dadf86924f5
i965: Don't free the intel_context structure when intelCreateContext fails.

intelDestroyContext will eventually be called, and it will clean things
up.  The call to brwInitVtbl is moved earlier so that
intelDestroyContext can call the device-specific destructor.  This also
makes the code look more like the i915 code.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
src/mesa/drivers/dri/i965/brw_context.c