Fixed a memory leak in function GL_RenderReadPixels
authorSteffen Pankratz <kratz00@gmx.de>
Tue, 11 Oct 2016 17:31:29 +0200
changeset 105087235bc13912c
parent 10507 fe2700e08d39
child 10509 f548233b2813
Fixed a memory leak in function GL_RenderReadPixels
src/render/opengl/SDL_render_gl.c
     1.1 --- a/src/render/opengl/SDL_render_gl.c	Mon Oct 10 23:26:26 2016 -0700
     1.2 +++ b/src/render/opengl/SDL_render_gl.c	Tue Oct 11 17:31:29 2016 +0200
     1.3 @@ -1438,6 +1438,7 @@
     1.4      }
     1.5  
     1.6      if (!convert_format(data, temp_format, &internalFormat, &format, &type)) {
     1.7 +        SDL_free(temp_pixels);
     1.8          return SDL_SetError("Texture format %s not supported by OpenGL",
     1.9                              SDL_GetPixelFormatName(temp_format));
    1.10      }