Skip to content

Commit

Permalink
Fixed bug 5121 - Use SDL_calloc instead of calloc in Wayland_CreateWi…
Browse files Browse the repository at this point in the history
…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 0eb6512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/wayland/SDL_waylandwindow.c
Expand Up @@ -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();

Expand Down

0 comments on commit 0eb6512

Please sign in to comment.