Fixed bug 2699 - possible memory leak in GL_RenderReadPixels

Benoit Pierre

If glReadPixels returns an error, than the temporary buffer is not deallocated
main
Sam Lantinga 2014-08-24 00:02:12 -07:00
parent 9d54a90098
commit 05cff7923c
1 changed files with 1 additions and 0 deletions

View File

@ -1429,6 +1429,7 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
format, type, temp_pixels);
if (GL_CheckError("glReadPixels()", renderer) < 0) {
SDL_free(temp_pixels);
return -1;
}