diff options
author | Ian Romanick <[email protected]> | 2012-09-28 08:29:12 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-09-28 15:05:24 -0700 |
commit | 22897c74979aa02facdd5cd729db8dadf86924f5 (patch) | |
tree | 189fc2b05521296c1a6bb958a358848016925568 /src/mesa | |
parent | f93cb0bebb10e3e3e5df099be51021b211650356 (diff) |
intel: Don't call intelDestroyContext if there is no context to destroy
Some error paths in the device-specific context creation functions can exit
before the deintel_context structure is allocated.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 5cb7e5d7d22..d6e6408afb2 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -821,7 +821,9 @@ intelCreateContext(gl_api api, if (success) return true; - intelDestroyContext(driContextPriv); + if (driContextPriv->driverPrivate != NULL) + intelDestroyContext(driContextPriv); + return false; } |