Commit 2ed47d83690f48cbf37d87938421f873451f602a

Gabriel Jacobo 2014-02-24T10:00:10

Fixes #2417, memory leak in SDL_gamecontroller.c (thanks Leonardo!)

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index a9fe327..51ce040 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -1223,6 +1223,7 @@ SDL_GameControllerQuit(void)
         pControllerMap = s_pSupportedControllers;
         s_pSupportedControllers = s_pSupportedControllers->next;
         SDL_free( pControllerMap->name );
+        SDL_free( pControllerMap->mapping );
         SDL_free( pControllerMap );
     }