Skip to content

Commit

Permalink
Fixed memory leaks if Windows initialization fails
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 21, 2024
1 parent f37144b commit fd5f7a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video/windows/SDL_windowsvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
data = NULL;
}
if (!data) {
SDL_UnregisterApp();
SDL_free(device);
return NULL;
}
Expand Down

0 comments on commit fd5f7a0

Please sign in to comment.