Browse Source

x11: Fix memory leak in X11_CreatePixmapCursor()

Cameron Gutman 3 years ago
parent
commit
eb3f1462b8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/video/x11/SDL_x11mouse.c

+ 2 - 0
src/video/x11/SDL_x11mouse.c

@@ -195,6 +195,8 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y)
                                  &fg, &bg, hot_x, hot_y);
     X11_XFreePixmap(display, data_pixmap);
     X11_XFreePixmap(display, mask_pixmap);
+    SDL_free(data_bits);
+    SDL_free(mask_bits);
 
     return cursor;
 }