Skip to content

Commit

Permalink
Fixed bug 3855 - Memory leak in SDL_FreeSurface
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonSchaefer committed Oct 2, 2017
1 parent e564da7 commit db20e71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/SDL_surface.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit db20e71

Please sign in to comment.