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>
Tue, 17 Nov 2009 16:29:36 +0000 (08:29 -0800)
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;
    }