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

Vinson Lee vlee at freedesktop.org
Fri Sep 27 22:14:36 PDT 2013


Fixes "Resource leak" defect reported by Coverity.

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

diff --git a/src/mesa/drivers/dri/i915/intel_pixel_read.c b/src/mesa/drivers/dri/i915/intel_pixel_read.c
index 26eb496..8fd1c8d 100644
--- a/src/mesa/drivers/dri/i915/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i915/intel_pixel_read.c
@@ -148,6 +148,7 @@ do_blit_readpixels(struct gl_context * ctx,
                            pbo_mt, 0, 0,
                            0, 0, dst_flip,
                            width, height, GL_COPY)) {
+      intel_miptree_release(&pbo_mt);
       return false;
    }
 
-- 
1.8.3.1



More information about the mesa-dev mailing list