mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Fixed bug 2699 - possible memory leak in GL_RenderReadPixels
Benoit Pierre If glReadPixels returns an error, than the temporary buffer is not deallocated
This commit is contained in:
parent
9d54a90098
commit
05cff7923c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user