Mesa (master): mesa: Free memory allocated for luminance in readpixels.

Matt Turner mattst88 at kemper.freedesktop.org
Mon Mar 2 18:28:43 UTC 2015


Module: Mesa
Branch: master
Commit: 87109acbed9c9b52f33d58ca06d9048d0ac7a215
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=87109acbed9c9b52f33d58ca06d9048d0ac7a215

Author: Matt Turner <mattst88 at gmail.com>
Date:   Sat Feb 28 11:08:17 2015 -0800

mesa: Free memory allocated for luminance in readpixels.

Cc: "10.4, 10.5" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

---

 src/mesa/main/readpix.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 2e4a460..ed0104c 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -594,6 +594,7 @@ read_rgba_pixels( struct gl_context *ctx,
       _mesa_format_convert(dst, dst_format, dst_stride,
                            luminance, luminance_format, luminance_stride,
                            width, height, NULL);
+      free(luminance);
    } else {
       _mesa_pack_luminance_from_rgba_integer(width * height, src, !src_is_uint,
                                              dst, format, type);




More information about the mesa-commit mailing list