Skip to content
Permalink
Browse files
Fixed bug 5121 - Use SDL_calloc instead of calloc in Wayland_CreateWi…
…ndow

meyraud705

'SDL_Windows::driverdata' of a Wayland window is allocated by calloc in 'Wayland_CreateWindow' but freed by SDL_free in 'Wayland_DestroyWindow'.
  • Loading branch information
slouken committed May 4, 2020
1 parent 65ad453 commit 0eb6512b537c529690ac2d3b65524c64d65f57e0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/video/wayland/SDL_waylandwindow.c
@@ -634,7 +634,7 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
SDL_VideoData *c;
struct wl_region *region;

data = calloc(1, sizeof *data);
data = SDL_calloc(1, sizeof *data);
if (data == NULL)
return SDL_OutOfMemory();

0 comments on commit 0eb6512

Please sign in to comment.