mirror of
https://github.com/yawut/SDL.git
synced 2026-04-19 23:27:32 -05:00
Fixed two memory leaks if added game controller mapping has lower priority.
Found by buildbot.
This commit is contained in:
parent
3f55f0f3cb
commit
df55bace19
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user