Skip to content
Permalink
Browse files

Fixed two memory leaks if added game controller mapping has lower pri…

…ority.

Found by buildbot.
  • Loading branch information
philippwiesemann committed Nov 19, 2016
1 parent a49ac09 commit eb9cc0306867c0bfddae64e9f0aa4f6fdf75bdbc
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/joystick/SDL_gamecontroller.c
@@ -675,6 +675,9 @@ SDL_PrivateAddMappingForGUID(SDL_JoystickGUID jGUID, const char *mappingString,
pControllerMapping->priority = priority;
/* refresh open controllers */
SDL_PrivateGameControllerRefreshMapping(pControllerMapping);
} else {
SDL_free(pchName);
SDL_free(pchMapping);
}
*existing = SDL_TRUE;
} else {

0 comments on commit eb9cc03

Please sign in to comment.