From 5f65fd360d0f60ad1feb84b31154eb1734d40f8c Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Mon, 22 Jan 2024 13:01:04 -0500 Subject: [PATCH] wayland: Free the input struct in all initialization failure paths --- src/video/wayland/SDL_waylandvideo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index efd1be7296..2a70f83577 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -222,6 +222,7 @@ static SDL_VideoDevice *Wayland_CreateDevice(void) /* Initialize all variables that we clean on shutdown */ device = SDL_calloc(1, sizeof(SDL_VideoDevice)); if (!device) { + SDL_free(input); SDL_free(data); WAYLAND_wl_display_disconnect(display); SDL_WAYLAND_UnloadSymbols();