From 0eb6512b537c529690ac2d3b65524c64d65f57e0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 4 May 2020 13:19:26 -0700 Subject: [PATCH] Fixed bug 5121 - Use SDL_calloc instead of calloc in Wayland_CreateWindow meyraud705 'SDL_Windows::driverdata' of a Wayland window is allocated by calloc in 'Wayland_CreateWindow' but freed by SDL_free in 'Wayland_DestroyWindow'. --- src/video/wayland/SDL_waylandwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 395e9418aa3cd..193040b7d2599 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/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();