Skip to content

Commit

Permalink
Fixed memory leak in XInput code
Browse files Browse the repository at this point in the history
Fixes #3597
  • Loading branch information
slouken committed Nov 6, 2023
1 parent bc3d9e9 commit 3e4d7e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/joystick/windows/SDL_xinputjoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,12 @@ void SDL_XINPUT_JoystickClose(SDL_Joystick *joystick)

void SDL_XINPUT_JoystickQuit(void)
{
int iuserid;

for (iuserid = 0; iuserid < XUSER_MAX_COUNT; ++iuserid) {
DelXInputDevice(iuserid);
}

if (s_bXInputEnabled) {
WIN_UnloadXInputDLL();
}
Expand Down

0 comments on commit 3e4d7e4

Please sign in to comment.