i915: Fix memory leak in do_blit_readpixels.
authorVinson Lee <vlee@freedesktop.org>
Sat, 28 Sep 2013 05:11:17 +0000 (22:11 -0700)
committerVinson Lee <vlee@freedesktop.org>
Tue, 1 Oct 2013 05:08:48 +0000 (22:08 -0700)
Fixes "Resource leak" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i915/intel_pixel_read.c

index 26eb4965b8dca2cb6e76550e4856c17139c47ef9..8fd1c8da587139e66af5a8fc0cba5c2513a302a5 100644 (file)
@@ -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;
    }