progs/util: Fix memory leak if LoadYUVImage fails.
authorVinson Lee <vlee@vmware.com>
Tue, 17 Nov 2009 02:22:26 +0000 (18:22 -0800)
committerVinson Lee <vlee@vmware.com>
Tue, 17 Nov 2009 02:24:06 +0000 (18:24 -0800)
progs/util/readtex.c

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