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 <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
(cherry picked from commit
22897c74979aa02facdd5cd729db8dadf86924f5)
if (success)
return true;
- intelDestroyContext(driContextPriv);
+ if (driContextPriv->driverPrivate != NULL)
+ intelDestroyContext(driContextPriv);
+
return false;
}