wayland: Free the input struct in all initialization failure paths

This commit is contained in:
Frank Praznik
2024-01-22 13:01:04 -05:00
parent 84e47b4af5
commit 5f65fd360d

View File

@@ -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();