Fixed memory leak.

This commit is contained in:
Robert Osfield 2016-06-21 17:04:22 +01:00
parent 17bd80329a
commit 011d60ec03

View File

@ -4585,7 +4585,8 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes);
#endif #endif
free(dstImage); if (srcImage) free(srcImage);
if (dstImage) free(dstImage);
return GLU_OUT_OF_MEMORY; return GLU_OUT_OF_MEMORY;
} }