glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore.
authorVinson Lee <vlee@vmware.com>
Tue, 24 Nov 2009 06:23:12 +0000 (01:23 -0500)
committerVinson Lee <vlee@vmware.com>
Tue, 24 Nov 2009 06:23:12 +0000 (01:23 -0500)
src/glu/sgi/libutil/mipmap.c

index c5faebd6a35f963303df26332d3e2acc325fb61a..a5d07a59cf75db1d19d97a7c73d4487332e1c18d 100644 (file)
@@ -8232,6 +8232,7 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
           glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes);
           glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images);
           glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height);
+          free(srcImage);
           return GLU_OUT_OF_MEMORY;
         }
        }