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

Vinson Lee vlee at kemper.freedesktop.org
Fri Dec 4 00:15:47 UTC 2009


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Nov 17 08:29:36 2009 -0800

progs/util: Fix memory if LoadRGBMipmaps2 fails.
(cherry picked from commit 28b8e4bcd76cc072b062e4c8575327c05ecb9a55)

---

 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 134eb79..4e22bed 100644
--- a/progs/util/readtex.c
+++ b/progs/util/readtex.c
@@ -305,6 +305,7 @@ GLboolean LoadRGBMipmaps2( const char *imageFile, GLenum target,
       fprintf(stderr,
               "Error in LoadRGBMipmaps %d-component images not implemented\n",
               image->components );
+      FreeImage(image);
       return GL_FALSE;
    }
 




More information about the mesa-commit mailing list