mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
i915,i965: Fix memory leak in try_pbo_upload (v2)
Fixes "Resource leak" defect reported by Coverity. Tested on Haswell, no Piglit regressions. v2: Apply to i965, not just i915. (chadv) CC: "9.2, 9.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
parent
6ca18e06ae
commit
035bf21983
2 changed files with 2 additions and 0 deletions
|
|
@ -171,6 +171,7 @@ try_pbo_upload(struct gl_context *ctx,
|
|||
0, 0, false,
|
||||
image->Width, image->Height, GL_COPY)) {
|
||||
DBG("%s: blit failed\n", __FUNCTION__);
|
||||
intel_miptree_release(&pbo_mt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ try_pbo_upload(struct gl_context *ctx,
|
|||
0, 0, false,
|
||||
image->Width, image->Height, GL_COPY)) {
|
||||
DBG("%s: blit failed\n", __FUNCTION__);
|
||||
intel_miptree_release(&pbo_mt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue