[Mesa-dev] [PATCH] i915: Fix memory leak in try_pbo_upload.

Vinson Lee vlee at freedesktop.org
Thu Aug 1 23:04:27 PDT 2013


Fixes "Resource leak" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/mesa/drivers/dri/i915/intel_tex_image.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i915/intel_tex_image.c b/src/mesa/drivers/dri/i915/intel_tex_image.c
index 9b1336d..975e77a 100644
--- a/src/mesa/drivers/dri/i915/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i915/intel_tex_image.c
@@ -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;
    }
 
-- 
1.8.3.1



More information about the mesa-dev mailing list