Fixed memory leak in game controller test program.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Thu, 05 May 2016 22:05:21 +0200
changeset 10162 562b819414b5
parent 10161 c0c399499591
child 10163 0f89301aae00
Fixed memory leak in game controller test program.
test/testgamecontroller.c
--- a/test/testgamecontroller.c	Thu May 05 22:04:16 2016 +0200
+++ b/test/testgamecontroller.c	Thu May 05 22:05:21 2016 +0200
@@ -181,6 +181,8 @@
     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;