mirror of https://github.com/encounter/SDL.git
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);
|
format, type, temp_pixels);
|
||||||
|
|
||||||
if (GL_CheckError("glReadPixels()", renderer) < 0) {
|
if (GL_CheckError("glReadPixels()", renderer) < 0) {
|
||||||
|
SDL_free(temp_pixels);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue