소스 검색

wayland: Free the input struct in all initialization failure paths

Frank Praznik 1 년 전
부모
커밋
5f65fd360d
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/video/wayland/SDL_waylandvideo.c

+ 1 - 0
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();