1
0
mirror of https://github.com/Relintai/sdl2_frt.git synced 2024-12-20 22:16:49 +01:00

5363 - Memory leak of joystick->sensors in SDL_JoystickClose

Mathieu Eyraud

Joystick->sensors is never freed.
This commit is contained in:
Sam Lantinga 2020-11-24 06:40:13 -08:00
parent 34bea84a54
commit feab9d42c1

View File

@ -1036,6 +1036,7 @@ SDL_JoystickClose(SDL_Joystick *joystick)
SDL_free(touchpad->fingers); SDL_free(touchpad->fingers);
} }
SDL_free(joystick->touchpads); SDL_free(joystick->touchpads);
SDL_free(joystick->sensors);
SDL_free(joystick); SDL_free(joystick);
SDL_UnlockJoysticks(); SDL_UnlockJoysticks();