Skip to content

Commit

Permalink
Fixed bug 2699 - possible memory leak in GL_RenderReadPixels
Browse files Browse the repository at this point in the history
Benoit Pierre

If glReadPixels returns an error, than the temporary buffer is not deallocated
  • Loading branch information
slouken committed Aug 24, 2014
1 parent 9d54a90 commit 05cff79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/render/opengl/SDL_render_gl.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 05cff79

Please sign in to comment.