progs/util: Fix memory if LoadRGBMipmaps2 fails.
authorVinson Lee <vlee@vmware.com>
Tue, 17 Nov 2009 16:29:36 +0000 (08:29 -0800)
committerVinson Lee <vlee@vmware.com>
Fri, 4 Dec 2009 00:15:22 +0000 (16:15 -0800)
(cherry picked from commit 28b8e4bcd76cc072b062e4c8575327c05ecb9a55)

progs/util/readtex.c

index 134eb79100abc0cb42da8dd703a2e80bedf6aa9b..4e22bed81af4313ad1ab3221acbff7ef2ccf4874 100644 (file)
@@ -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;
    }