Mesa (mesa_7_6_branch): progs/util: Fix memory leak if LoadYUVImage fails.

Vinson Lee vlee at kemper.freedesktop.org
Thu Dec 3 16:07:58 PST 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 4ca8e1680ed2e8437653c6f16f39438e51ce24ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ca8e1680ed2e8437653c6f16f39438e51ce24ae

Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Nov 16 18:22:26 2009 -0800

progs/util: Fix memory leak if LoadYUVImage fails.
(cherry picked from commit 0e790ac35327a0b53a4a595a6429135317302269)

---

 progs/util/readtex.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/progs/util/readtex.c b/progs/util/readtex.c
index 8e923b6..134eb79 100644
--- a/progs/util/readtex.c
+++ b/progs/util/readtex.c
@@ -438,6 +438,7 @@ GLushort *LoadYUVImage( const char *imageFile, GLint *width, GLint *height )
       fprintf(stderr,
               "Error in LoadYUVImage %d-component images not implemented\n",
               image->components );
+      FreeImage(image);
       return NULL;
    }
 



More information about the mesa-commit mailing list