Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bug 3512 - Memory leak of SDL_Joystick axes_zero array
Benjamin Harris

Found with valgrind and confirmed in the 2.0.5 source code.
One-line fix in SDL_JoystickClose?
  • Loading branch information
slouken committed Dec 9, 2016
1 parent a525017 commit 3b18c79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/joystick/SDL_joystick.c
Expand Up @@ -486,6 +486,7 @@ SDL_JoystickClose(SDL_Joystick * joystick)

/* Free the data associated with this joystick */
SDL_free(joystick->axes);
SDL_free(joystick->axes_zero);
SDL_free(joystick->hats);
SDL_free(joystick->balls);
SDL_free(joystick->buttons);
Expand Down

0 comments on commit 3b18c79

Please sign in to comment.