Fixed bug 3855 - Memory leak in SDL_FreeSurface

This commit is contained in:
Brandon Schaefer 2017-10-02 10:50:33 -07:00
parent c355765d99
commit 5df6ac64d0

View file

@ -1217,6 +1217,9 @@ SDL_FreeSurface(SDL_Surface * surface)
if (!(surface->flags & SDL_PREALLOC)) {
SDL_free(surface->pixels);
}
if (surface->map) {
SDL_FreeBlitMap(surface->map);
}
SDL_free(surface);
}