From 6a9a8b682c967f8c3870f5234ea5548775a1311a Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Thu, 5 May 2016 22:05:21 +0200 Subject: [PATCH] Fixed memory leak in game controller test program. --- test/testgamecontroller.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c index ec1dfd32293b2..908f400056b15 100644 --- a/test/testgamecontroller.c +++ b/test/testgamecontroller.c @@ -181,6 +181,8 @@ WatchGameController(SDL_GameController * gamecontroller) window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH, SCREEN_HEIGHT, 0); + SDL_free(title); + title = NULL; if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); return SDL_FALSE;