Fixed bug 3855 - Memory leak in SDL_FreeSurface
authorBrandon Schaefer <brandon.schaefer@canonical.com>
Mon, 02 Oct 2017 10:50:33 -0700
changeset 115633a23ca106752
parent 11553 b89649d1a7a5
child 11567 dc7245e3d1f2
Fixed bug 3855 - Memory leak in SDL_FreeSurface
src/video/SDL_surface.c
     1.1 --- a/src/video/SDL_surface.c	Fri Sep 29 10:15:44 2017 -0700
     1.2 +++ b/src/video/SDL_surface.c	Mon Oct 02 10:50:33 2017 -0700
     1.3 @@ -1217,6 +1217,9 @@
     1.4      if (!(surface->flags & SDL_PREALLOC)) {
     1.5          SDL_free(surface->pixels);
     1.6      }
     1.7 +    if (surface->map) {
     1.8 +        SDL_FreeBlitMap(surface->map);
     1.9 +    }
    1.10      SDL_free(surface);
    1.11  }
    1.12