mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 04:40:09 +01:00
i915: Don't free the intel_context structure when intelCreateContext fails.
intelDestroyContext will eventually be called, and it will clean things up. 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
This commit is contained in:
parent
87f26214d6
commit
de958de71b
1 changed files with 0 additions and 3 deletions
|
|
@ -167,7 +167,6 @@ i915CreateContext(int api,
|
||||||
|
|
||||||
if (!intelInitContext(intel, api, mesaVis, driContextPriv,
|
if (!intelInitContext(intel, api, mesaVis, driContextPriv,
|
||||||
sharedContextPrivate, &functions)) {
|
sharedContextPrivate, &functions)) {
|
||||||
free(i915);
|
|
||||||
*error = __DRI_CTX_ERROR_NO_MEMORY;
|
*error = __DRI_CTX_ERROR_NO_MEMORY;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -184,7 +183,6 @@ i915CreateContext(int api,
|
||||||
|
|
||||||
if (req_version > max_version) {
|
if (req_version > max_version) {
|
||||||
*error = __DRI_CTX_ERROR_BAD_VERSION;
|
*error = __DRI_CTX_ERROR_BAD_VERSION;
|
||||||
free(i915);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -194,7 +192,6 @@ i915CreateContext(int api,
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*error = __DRI_CTX_ERROR_BAD_API;
|
*error = __DRI_CTX_ERROR_BAD_API;
|
||||||
free(i915);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue