Commit db20e71d546ef7cd38652893befa742867278af5

Brandon Schaefer 2017-10-02T10:50:33

Fixed bug 3855 - Memory leak in SDL_FreeSurface

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index 75b699c..cabe7e0 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -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);
 }