Browse Source

Fixed bug 3855 - Memory leak in SDL_FreeSurface

Brandon Schaefer 7 years ago
parent
commit
db20e71d54
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/video/SDL_surface.c

+ 3 - 0
src/video/SDL_surface.c

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